Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- AvTraceFormat.cs
- BaseCodeDomTreeGenerator.cs
- ObjectDataSourceFilteringEventArgs.cs
- QilInvoke.cs
- PersonalizationProviderHelper.cs
- ClientRuntimeConfig.cs
- TriggerAction.cs
- SiteOfOriginContainer.cs
- StringCollection.cs
- DesignerAttribute.cs
- XmlCharType.cs
- InteropBitmapSource.cs
- CustomTokenProvider.cs
- WebControlsSection.cs
- PolyLineSegmentFigureLogic.cs
- EnterpriseServicesHelper.cs
- DataContractJsonSerializer.cs
- ImageAutomationPeer.cs
- TableLayoutRowStyleCollection.cs
- HandlerFactoryWrapper.cs
- ImageCodecInfoPrivate.cs
- mediaclock.cs
- ObjectViewFactory.cs
- LambdaCompiler.Lambda.cs
- Hyperlink.cs
- RawStylusInputCustomData.cs
- QueryOutputWriter.cs
- Underline.cs
- EmptyStringExpandableObjectConverter.cs
- ListViewHitTestInfo.cs
- DataReaderContainer.cs
- DomainUpDown.cs
- ContentType.cs
- PageThemeParser.cs
- StyleModeStack.cs
- _HeaderInfo.cs
- RequestQueryParser.cs
- CollectionType.cs
- IpcChannel.cs
- FileNotFoundException.cs
- CoTaskMemHandle.cs
- GuidConverter.cs
- TypeInfo.cs
- MexServiceChannelBuilder.cs
- SelectedCellsChangedEventArgs.cs
- HtmlInputReset.cs
- Executor.cs
- ObjectStateFormatter.cs
- RegexRunner.cs
- DeferredReference.cs
- XmlWriterSettings.cs
- LoginView.cs
- CodeDomSerializationProvider.cs
- TagPrefixInfo.cs
- RegexRunnerFactory.cs
- followingquery.cs
- ClrProviderManifest.cs
- ControlIdConverter.cs
- CorruptingExceptionCommon.cs
- DataGridViewTopRowAccessibleObject.cs
- BufferBuilder.cs
- TreeView.cs
- SafeNativeMethods.cs
- SqlVisitor.cs
- ParseChildrenAsPropertiesAttribute.cs
- Int32Rect.cs
- TableCellCollection.cs
- InternalDuplexBindingElement.cs
- ColorConvertedBitmapExtension.cs
- InkCanvasInnerCanvas.cs
- SRDisplayNameAttribute.cs
- ServicePointManager.cs
- MailAddressCollection.cs
- DictionaryEntry.cs
- DataGridSortCommandEventArgs.cs
- XsltContext.cs
- NetNamedPipeSecurityMode.cs
- DependencyPropertyConverter.cs
- DBCommand.cs
- SqlTopReducer.cs
- DatatypeImplementation.cs
- UInt16.cs
- HtmlInputPassword.cs
- DashStyle.cs
- HttpCacheParams.cs
- PeerObject.cs
- PropertyMap.cs
- Pair.cs
- StyleHelper.cs
- Config.cs
- HttpListenerResponse.cs
- FileClassifier.cs
- DataSourceCache.cs
- ObjectItemCachedAssemblyLoader.cs
- UserControl.cs
- errorpatternmatcher.cs
- DropDownButton.cs
- TransactionManager.cs
- EndpointAddress.cs
- DerivedKeyCachingSecurityTokenSerializer.cs