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
- ExpressionNormalizer.cs
- ItemPager.cs
- DesignerAdapterUtil.cs
- DesignerWithHeader.cs
- SaveRecipientRequest.cs
- DataControlFieldCollection.cs
- Synchronization.cs
- PropertyCollection.cs
- SingleStorage.cs
- SharedPerformanceCounter.cs
- UIElementHelper.cs
- URLIdentityPermission.cs
- Oid.cs
- WindowsListViewItem.cs
- InternalBase.cs
- InputScopeNameConverter.cs
- COM2ExtendedUITypeEditor.cs
- NativeWrapper.cs
- ForceCopyBuildProvider.cs
- ProviderConnectionPoint.cs
- NavigationExpr.cs
- XPathSingletonIterator.cs
- PreloadedPackages.cs
- XmlCompatibilityReader.cs
- SoapTransportImporter.cs
- FileUtil.cs
- BuildProvidersCompiler.cs
- SkinIDTypeConverter.cs
- NullableLongSumAggregationOperator.cs
- CuspData.cs
- UserValidatedEventArgs.cs
- QueryAccessibilityHelpEvent.cs
- WebPartDisplayModeCollection.cs
- DocumentViewerAutomationPeer.cs
- ObjectViewQueryResultData.cs
- RunInstallerAttribute.cs
- ProfessionalColorTable.cs
- WebBrowserNavigatingEventHandler.cs
- XmlAtomicValue.cs
- ZipPackagePart.cs
- ClickablePoint.cs
- OAVariantLib.cs
- TextTreeRootTextBlock.cs
- MemoryFailPoint.cs
- ContextMarshalException.cs
- Border.cs
- Accessors.cs
- PropertyTabAttribute.cs
- AsyncOperation.cs
- OutputCacheSection.cs
- CounterSet.cs
- Win32.cs
- Pointer.cs
- DocumentCollection.cs
- TextParagraph.cs
- UIElementPropertyUndoUnit.cs
- DecoderBestFitFallback.cs
- ReceiveMessageContent.cs
- FlowDocumentReader.cs
- IgnoreSectionHandler.cs
- SqlFactory.cs
- SessionEndedEventArgs.cs
- ItemsControlAutomationPeer.cs
- ItemsControlAutomationPeer.cs
- CollectionViewGroupInternal.cs
- TextElementCollectionHelper.cs
- UnmanagedMemoryStreamWrapper.cs
- KnownTypeDataContractResolver.cs
- RegexWriter.cs
- ComPlusServiceHost.cs
- XmlStringTable.cs
- ResourceDescriptionAttribute.cs
- RepeaterCommandEventArgs.cs
- QilDataSource.cs
- SmtpException.cs
- RectangleHotSpot.cs
- ServiceNameElement.cs
- DecimalAnimationUsingKeyFrames.cs
- EntitySet.cs
- VoiceObjectToken.cs
- EUCJPEncoding.cs
- OleDbEnumerator.cs
- PropertyMapper.cs
- PreProcessor.cs
- HtmlInputControl.cs
- HttpCacheVary.cs
- DataServiceProviderMethods.cs
- Msec.cs
- StructuredTypeInfo.cs
- QueryableDataSourceView.cs
- XmlNodeChangedEventArgs.cs
- TextClipboardData.cs
- Nullable.cs
- ThicknessConverter.cs
- RightsManagementInformation.cs
- CharConverter.cs
- LiteralControl.cs
- DataObject.cs
- RecordsAffectedEventArgs.cs
- HttpRequestContext.cs