Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / OrderedDictionaryStateHelper.cs / 1305376 / OrderedDictionaryStateHelper.cs
//// Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ namespace System.Web.UI { using System; using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Web.Util; internal static class OrderedDictionaryStateHelper { public static void LoadViewState(IOrderedDictionary dictionary, ArrayList state) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } if (state == null) { throw new ArgumentNullException("state"); } if (state != null) { for (int i = 0; i < state.Count; i++) { Pair pairEntry = (Pair)state[i]; dictionary.Add(pairEntry.First, pairEntry.Second); } } } public static ArrayList SaveViewState(IOrderedDictionary dictionary) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } ArrayList list = new ArrayList(dictionary.Count); foreach (DictionaryEntry entry in dictionary) { list.Add(new Pair(entry.Key, entry.Value)); } return list; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //// Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ namespace System.Web.UI { using System; using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Web.Util; internal static class OrderedDictionaryStateHelper { public static void LoadViewState(IOrderedDictionary dictionary, ArrayList state) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } if (state == null) { throw new ArgumentNullException("state"); } if (state != null) { for (int i = 0; i < state.Count; i++) { Pair pairEntry = (Pair)state[i]; dictionary.Add(pairEntry.First, pairEntry.Second); } } } public static ArrayList SaveViewState(IOrderedDictionary dictionary) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } ArrayList list = new ArrayList(dictionary.Count); foreach (DictionaryEntry entry in dictionary) { list.Add(new Pair(entry.Key, entry.Value)); } return list; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewCellMouseEventArgs.cs
- WindowsIPAddress.cs
- PagePropertiesChangingEventArgs.cs
- ExtentCqlBlock.cs
- ReaderWriterLockWrapper.cs
- ObjectViewQueryResultData.cs
- SimpleTypesSurrogate.cs
- ToolStripItem.cs
- GeometryHitTestParameters.cs
- TypeReference.cs
- SortDescriptionCollection.cs
- MemberInfoSerializationHolder.cs
- DataSourceCacheDurationConverter.cs
- CodeMemberMethod.cs
- SchemaAttDef.cs
- ConstraintConverter.cs
- CachedPathData.cs
- CreateParams.cs
- DataGridViewCheckBoxCell.cs
- DeleteCardRequest.cs
- UInt32.cs
- ScriptResourceInfo.cs
- InvalidEnumArgumentException.cs
- panel.cs
- QueryCacheKey.cs
- AccessibilityHelperForVista.cs
- GeneralEndpointIdentity.cs
- PermissionAttributes.cs
- DeviceSpecificChoiceCollection.cs
- ColumnMapVisitor.cs
- IsolatedStorageFileStream.cs
- WindowsAuthenticationEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- RegexRunner.cs
- DataIdProcessor.cs
- DetailsViewInsertEventArgs.cs
- MultiViewDesigner.cs
- CreatingCookieEventArgs.cs
- EventDriven.cs
- IERequestCache.cs
- DataGridViewCheckBoxColumn.cs
- VarInfo.cs
- XmlSchemaAll.cs
- DbSetClause.cs
- PrintDialogDesigner.cs
- mongolianshape.cs
- BamlCollectionHolder.cs
- ValidationError.cs
- MetadataSource.cs
- SoapParser.cs
- ViewRendering.cs
- ConnectionManagementSection.cs
- DefaultSection.cs
- UrlPropertyAttribute.cs
- WebDisplayNameAttribute.cs
- EntityContainerEntitySetDefiningQuery.cs
- VarRemapper.cs
- FirewallWrapper.cs
- ClipboardData.cs
- TextParentUndoUnit.cs
- AnnotationResource.cs
- ClockController.cs
- SimplePropertyEntry.cs
- _HelperAsyncResults.cs
- Compress.cs
- TableRowGroupCollection.cs
- ConfigurationManager.cs
- ISAPIWorkerRequest.cs
- NamedPipeAppDomainProtocolHandler.cs
- Atom10FormatterFactory.cs
- COM2ColorConverter.cs
- COM2PropertyDescriptor.cs
- NullExtension.cs
- FileRegion.cs
- CodeObjectCreateExpression.cs
- SqlDesignerDataSourceView.cs
- ProcessModule.cs
- PropertyDescriptorCollection.cs
- QualificationDataItem.cs
- TargetException.cs
- FontInfo.cs
- HTTPNotFoundHandler.cs
- Graph.cs
- RuntimeComponentFilter.cs
- mongolianshape.cs
- SourceFileBuildProvider.cs
- ThicknessConverter.cs
- TogglePattern.cs
- IntSumAggregationOperator.cs
- FormatterServices.cs
- Clause.cs
- AppDomainCompilerProxy.cs
- ExeConfigurationFileMap.cs
- TextRangeSerialization.cs
- ResourceType.cs
- ReflectionHelper.cs
- BitmapCodecInfo.cs
- VisualStyleInformation.cs
- MenuItemCollection.cs
- SafeRegistryKey.cs