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
- ExtendedTransformFactory.cs
- SupportsPreviewControlAttribute.cs
- ComponentResourceManager.cs
- ObjectConverter.cs
- WebCodeGenerator.cs
- UnauthorizedAccessException.cs
- HintTextConverter.cs
- TypeContext.cs
- InsufficientMemoryException.cs
- JoinCqlBlock.cs
- WsdlBuildProvider.cs
- SchemaImporterExtensionElement.cs
- StructuralCache.cs
- TextRunCache.cs
- SamlSecurityTokenAuthenticator.cs
- webeventbuffer.cs
- ClientApiGenerator.cs
- Win32.cs
- sqlmetadatafactory.cs
- WebServicesSection.cs
- Misc.cs
- DuplexChannelBinder.cs
- SequentialUshortCollection.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- RewritingValidator.cs
- ToolStripStatusLabel.cs
- TickBar.cs
- EventLog.cs
- SqlOuterApplyReducer.cs
- CharacterBuffer.cs
- SynchronizationContextHelper.cs
- ResourceManagerWrapper.cs
- SchemaAttDef.cs
- TypeBuilderInstantiation.cs
- PrimitiveType.cs
- ParagraphVisual.cs
- BamlTreeMap.cs
- CookieParameter.cs
- ContextProperty.cs
- StylusPointCollection.cs
- DetailsViewDeleteEventArgs.cs
- DesignTimeVisibleAttribute.cs
- WebConfigurationFileMap.cs
- ProcessModule.cs
- SecurityElement.cs
- LoadedOrUnloadedOperation.cs
- StringValidator.cs
- WindowsContainer.cs
- OperationAbortedException.cs
- StylesEditorDialog.cs
- AttributeEmitter.cs
- StringFreezingAttribute.cs
- BaseTemplatedMobileComponentEditor.cs
- DataBoundControlActionList.cs
- InvokePatternIdentifiers.cs
- XmlSchemaExporter.cs
- OdbcReferenceCollection.cs
- MatrixTransform.cs
- XmlSortKey.cs
- IPipelineRuntime.cs
- PolyLineSegment.cs
- ListControlStringCollectionEditor.cs
- BackoffTimeoutHelper.cs
- unsafenativemethodsother.cs
- UriSection.cs
- GridViewColumnHeaderAutomationPeer.cs
- PriorityItem.cs
- KnownBoxes.cs
- ScaleTransform3D.cs
- TextTreeUndoUnit.cs
- XmlWellformedWriter.cs
- ProxyManager.cs
- WebPartMovingEventArgs.cs
- XsltSettings.cs
- OleStrCAMarshaler.cs
- DataGridTableCollection.cs
- StrongNameHelpers.cs
- RawKeyboardInputReport.cs
- TextComposition.cs
- ContentValidator.cs
- SortFieldComparer.cs
- WindowInteractionStateTracker.cs
- MexHttpsBindingCollectionElement.cs
- MDIClient.cs
- WindowAutomationPeer.cs
- HttpCapabilitiesEvaluator.cs
- EndEvent.cs
- TextRangeEdit.cs
- WindowsProgressbar.cs
- InputBinding.cs
- DBBindings.cs
- PropertyChangedEventManager.cs
- XmlSchemaSimpleTypeUnion.cs
- StylusSystemGestureEventArgs.cs
- XslTransform.cs
- InstrumentationTracker.cs
- Matrix3DStack.cs
- Geometry3D.cs
- CqlQuery.cs
- TransactedBatchContext.cs