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
- RegisteredHiddenField.cs
- PriorityRange.cs
- MatrixCamera.cs
- MimeMapping.cs
- RemotingServices.cs
- ListComponentEditorPage.cs
- MethodImplAttribute.cs
- WebServiceReceive.cs
- CriticalHandle.cs
- WebPartEditorApplyVerb.cs
- VoiceInfo.cs
- QueryRewriter.cs
- DBConnectionString.cs
- DataRelationPropertyDescriptor.cs
- XmlSerializer.cs
- UnauthorizedAccessException.cs
- BamlRecordReader.cs
- SQLBinaryStorage.cs
- EventsTab.cs
- HyperLinkField.cs
- Solver.cs
- BitmapEffectDrawingContextState.cs
- IsolatedStorageFile.cs
- KerberosReceiverSecurityToken.cs
- SuppressIldasmAttribute.cs
- TextViewBase.cs
- UnsafeNativeMethods.cs
- TextPointer.cs
- MenuItemBinding.cs
- Command.cs
- TextProperties.cs
- EntityTypeEmitter.cs
- IsolatedStorage.cs
- DetailsViewInsertEventArgs.cs
- ReadOnlyHierarchicalDataSourceView.cs
- Adorner.cs
- StorageMappingItemCollection.cs
- DispatcherProcessingDisabled.cs
- RegisteredDisposeScript.cs
- ToolStripContainerDesigner.cs
- PersonalizationProviderHelper.cs
- ByteStreamMessageUtility.cs
- InfoCardProofToken.cs
- PhysicalFontFamily.cs
- Input.cs
- ApplicationProxyInternal.cs
- ContentTextAutomationPeer.cs
- MetadataItem_Static.cs
- DesignerProperties.cs
- Type.cs
- WindowsFormsHostAutomationPeer.cs
- Condition.cs
- InstancePersistence.cs
- InputElement.cs
- RSAPKCS1SignatureFormatter.cs
- AuthenticationSection.cs
- XamlInterfaces.cs
- HitTestFilterBehavior.cs
- ConstraintManager.cs
- LeftCellWrapper.cs
- MembershipValidatePasswordEventArgs.cs
- VectorCollectionValueSerializer.cs
- SqlClientWrapperSmiStream.cs
- DtcInterfaces.cs
- SafeNativeMethods.cs
- LayoutTable.cs
- AddingNewEventArgs.cs
- BindingContext.cs
- DbMetaDataCollectionNames.cs
- SerTrace.cs
- URL.cs
- SortedDictionary.cs
- EntityClassGenerator.cs
- PeerNameResolver.cs
- TextModifierScope.cs
- HttpListenerException.cs
- HtmlInputSubmit.cs
- CodeObject.cs
- AsyncOperation.cs
- XmlSerializerObjectSerializer.cs
- WebDescriptionAttribute.cs
- RowVisual.cs
- formatter.cs
- MetafileHeader.cs
- ToolboxItemFilterAttribute.cs
- StaticResourceExtension.cs
- ResourceManager.cs
- SqlNodeAnnotation.cs
- dbenumerator.cs
- GridViewPageEventArgs.cs
- UserValidatedEventArgs.cs
- Unit.cs
- SqlColumnizer.cs
- ColumnWidthChangingEvent.cs
- CommandConverter.cs
- StringSource.cs
- SpeechUI.cs
- MachineKeySection.cs
- _LocalDataStore.cs
- CryptoConfig.cs