Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DelegatingTypeDescriptionProvider.cs
- PermissionAttributes.cs
- KnownTypeDataContractResolver.cs
- MessageSmuggler.cs
- PrimarySelectionGlyph.cs
- XMLSyntaxException.cs
- XmlLoader.cs
- DesignerEditorPartChrome.cs
- FontNamesConverter.cs
- XmlIncludeAttribute.cs
- ProxyManager.cs
- LeaseManager.cs
- PriorityRange.cs
- ProjectionCamera.cs
- GeometryCollection.cs
- RegexInterpreter.cs
- RadioButtonPopupAdapter.cs
- WebPartConnectionsDisconnectVerb.cs
- AttachedAnnotationChangedEventArgs.cs
- SafeEventHandle.cs
- TextEvent.cs
- ScriptRef.cs
- InheritedPropertyDescriptor.cs
- FileController.cs
- ClearCollection.cs
- DefaultTextStoreTextComposition.cs
- ContextMenuStrip.cs
- FontStyleConverter.cs
- Enumerable.cs
- XmlAttribute.cs
- BasicViewGenerator.cs
- SmiContext.cs
- URLIdentityPermission.cs
- TrackingMemoryStreamFactory.cs
- PathFigure.cs
- WaitHandleCannotBeOpenedException.cs
- TransactionManager.cs
- BaseTemplateParser.cs
- SmtpTransport.cs
- SecurityTokenRequirement.cs
- IncomingWebResponseContext.cs
- TemplateBindingExpression.cs
- WebHttpSecurityElement.cs
- SortQuery.cs
- EraserBehavior.cs
- LabelEditEvent.cs
- UnsignedPublishLicense.cs
- Timer.cs
- Compiler.cs
- SqlProviderServices.cs
- FixedHyperLink.cs
- BinaryQueryOperator.cs
- EntityConnection.cs
- Size.cs
- ColorBlend.cs
- TextFragmentEngine.cs
- DocumentGrid.cs
- DataGridViewRowConverter.cs
- JsonServiceDocumentSerializer.cs
- CodeAttributeDeclarationCollection.cs
- BasicViewGenerator.cs
- LoginDesignerUtil.cs
- ProfileParameter.cs
- DataPagerField.cs
- HGlobalSafeHandle.cs
- AssemblyEvidenceFactory.cs
- XmlSchemaAnnotated.cs
- BigInt.cs
- MachineSettingsSection.cs
- _DisconnectOverlappedAsyncResult.cs
- SessionEndingCancelEventArgs.cs
- ListBase.cs
- TextLineBreak.cs
- RegisteredExpandoAttribute.cs
- controlskin.cs
- TripleDES.cs
- IdentifierCollection.cs
- DelayDesigner.cs
- MsmqBindingElementBase.cs
- Merger.cs
- TabItemAutomationPeer.cs
- StrongNameMembershipCondition.cs
- DocumentViewerAutomationPeer.cs
- XsdBuildProvider.cs
- TextBreakpoint.cs
- ChannelPool.cs
- DeleteMemberBinder.cs
- UnsafeNativeMethodsPenimc.cs
- Cursors.cs
- TextElementCollectionHelper.cs
- TransportSecurityProtocol.cs
- nulltextnavigator.cs
- SurrogateChar.cs
- ExceptionAggregator.cs
- ValueType.cs
- BindingSourceDesigner.cs
- ClientTarget.cs
- RequiredFieldValidator.cs
- RedirectionProxy.cs
- PrintDialogDesigner.cs