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
- SqlAggregateChecker.cs
- MachineKeySection.cs
- ParserHooks.cs
- InplaceBitmapMetadataWriter.cs
- ErrorsHelper.cs
- StylusPointDescription.cs
- EntityParameter.cs
- RemotingAttributes.cs
- ResXDataNode.cs
- HtmlControlPersistable.cs
- EmbeddedMailObjectsCollection.cs
- TaiwanLunisolarCalendar.cs
- HttpListenerContext.cs
- RefreshEventArgs.cs
- SizeAnimationUsingKeyFrames.cs
- RequestDescription.cs
- SRDisplayNameAttribute.cs
- CodeEntryPointMethod.cs
- HttpApplicationFactory.cs
- ELinqQueryState.cs
- TypeForwardedToAttribute.cs
- XamlVector3DCollectionSerializer.cs
- ArrayWithOffset.cs
- MessageFilterTable.cs
- DetailsViewInsertEventArgs.cs
- ProcessRequestArgs.cs
- CheckPair.cs
- RawKeyboardInputReport.cs
- RectAnimationUsingKeyFrames.cs
- DynamicMetaObject.cs
- ProfileManager.cs
- HtmlButton.cs
- DetailsViewInsertedEventArgs.cs
- DataGridViewLinkColumn.cs
- HotSpotCollection.cs
- OdbcError.cs
- CompensationExtension.cs
- SoapFormatter.cs
- OracleInfoMessageEventArgs.cs
- GC.cs
- FileAuthorizationModule.cs
- WebPartEditorCancelVerb.cs
- QilTargetType.cs
- HandlerBase.cs
- RemotingConfigParser.cs
- invalidudtexception.cs
- TextServicesHost.cs
- TypeConverterHelper.cs
- MsmqIntegrationValidationBehavior.cs
- RequestCachePolicy.cs
- HttpProtocolImporter.cs
- LineUtil.cs
- CacheDependency.cs
- ErrorHandler.cs
- GenericsNotImplementedException.cs
- TextElementCollection.cs
- EventProxy.cs
- SizeKeyFrameCollection.cs
- CacheSection.cs
- SignerInfo.cs
- GeneralEndpointIdentity.cs
- AtomServiceDocumentSerializer.cs
- WebCategoryAttribute.cs
- ProcessModuleCollection.cs
- RadioButton.cs
- EventHandlerService.cs
- IisTraceWebEventProvider.cs
- MembershipSection.cs
- Stackframe.cs
- PartialCachingAttribute.cs
- DataGridViewSortCompareEventArgs.cs
- CodeAccessPermission.cs
- XmlArrayItemAttributes.cs
- BooleanAnimationUsingKeyFrames.cs
- ActivityMarkupSerializer.cs
- FontStyles.cs
- FontConverter.cs
- RepeaterItem.cs
- pingexception.cs
- PathSegment.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- Point.cs
- CompilationLock.cs
- ObjectListSelectEventArgs.cs
- DesignerActionList.cs
- WaitHandle.cs
- View.cs
- FormViewInsertedEventArgs.cs
- securitymgrsite.cs
- DbModificationCommandTree.cs
- Matrix3DConverter.cs
- XmlNotation.cs
- HtmlInputFile.cs
- NamedObject.cs
- AccessorTable.cs
- FormatterServices.cs
- WebPartEventArgs.cs
- UnsafeCollabNativeMethods.cs
- OdbcEnvironment.cs
- ChangeTracker.cs