Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / OrderedDictionaryStateHelper.cs / 1 / 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
- NetTcpSecurity.cs
- RecognizerStateChangedEventArgs.cs
- PageThemeParser.cs
- MenuCommandService.cs
- DataListComponentEditor.cs
- FormViewModeEventArgs.cs
- SqlAliaser.cs
- HttpResponse.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- formatter.cs
- TcpSocketManager.cs
- Profiler.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- WorkflowDesignerColors.cs
- PropertyIDSet.cs
- DebugView.cs
- WorkflowQueueInfo.cs
- Int32Collection.cs
- BrowserCapabilitiesFactory.cs
- ThousandthOfEmRealPoints.cs
- XmlDocumentSchema.cs
- Axis.cs
- ProfileSection.cs
- ObjectTokenCategory.cs
- ConnectionsZoneDesigner.cs
- ItemCollection.cs
- Profiler.cs
- ObjectCloneHelper.cs
- ComplexTypeEmitter.cs
- TextAction.cs
- Exception.cs
- DES.cs
- Control.cs
- Hashtable.cs
- ToolStripOverflow.cs
- ParameterCollection.cs
- GroupBox.cs
- PersistenceTypeAttribute.cs
- ValidatorAttribute.cs
- String.cs
- ReadWriteObjectLock.cs
- XmlDataLoader.cs
- InputMethodStateChangeEventArgs.cs
- XpsFilter.cs
- ContainerParaClient.cs
- FastPropertyAccessor.cs
- DictionarySurrogate.cs
- CompensateDesigner.cs
- AnnotationHelper.cs
- InArgument.cs
- BindStream.cs
- ObjectDataSourceDisposingEventArgs.cs
- DBConnectionString.cs
- FlowPosition.cs
- WindowsTreeView.cs
- TextDecorationCollection.cs
- SHA1CryptoServiceProvider.cs
- MergablePropertyAttribute.cs
- DataControlButton.cs
- Int16.cs
- ValidatorCollection.cs
- CultureInfoConverter.cs
- FixedPosition.cs
- ConnectionsZoneDesigner.cs
- TextFormatter.cs
- DocumentAutomationPeer.cs
- TextEditorTyping.cs
- QuaternionAnimation.cs
- FormatConvertedBitmap.cs
- XmlSchemaAppInfo.cs
- TextServicesManager.cs
- BinaryObjectWriter.cs
- RowSpanVector.cs
- SoapSchemaImporter.cs
- DocumentPaginator.cs
- ButtonChrome.cs
- StreamReader.cs
- DbQueryCommandTree.cs
- TerminateSequenceResponse.cs
- OracleParameterCollection.cs
- XmlSchemaSubstitutionGroup.cs
- MailAddressCollection.cs
- LocationReferenceValue.cs
- DataGridViewSortCompareEventArgs.cs
- StrokeDescriptor.cs
- ForeignKeyFactory.cs
- Rect3D.cs
- CharacterShapingProperties.cs
- DataSysAttribute.cs
- DeviceContexts.cs
- DocumentApplicationJournalEntry.cs
- SafeRightsManagementQueryHandle.cs
- WebPartDisplayModeEventArgs.cs
- CapabilitiesRule.cs
- CommunicationObjectFaultedException.cs
- Sequence.cs
- HMACMD5.cs
- WindowsSysHeader.cs
- EnumMember.cs
- ElapsedEventArgs.cs