Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CustomBinding.cs
- Dump.cs
- CollectionDataContract.cs
- ThreadInterruptedException.cs
- TextEncodedRawTextWriter.cs
- DataSetFieldSchema.cs
- Tuple.cs
- FilteredDataSetHelper.cs
- PathGeometry.cs
- EntryPointNotFoundException.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- SequentialOutput.cs
- ActivityTypeResolver.xaml.cs
- EventToken.cs
- Avt.cs
- FileNotFoundException.cs
- SafeWaitHandle.cs
- XappLauncher.cs
- HMACSHA384.cs
- Stackframe.cs
- Stylus.cs
- XhtmlTextWriter.cs
- SHA256.cs
- ToolStripSystemRenderer.cs
- HitTestParameters3D.cs
- HotSpotCollection.cs
- DbMetaDataColumnNames.cs
- DragDeltaEventArgs.cs
- LineMetrics.cs
- NotificationContext.cs
- Utils.cs
- LinkClickEvent.cs
- RequestNavigateEventArgs.cs
- TemplateNodeContextMenu.cs
- RequestCacheEntry.cs
- GenericsNotImplementedException.cs
- NodeLabelEditEvent.cs
- SubclassTypeValidator.cs
- CachedCompositeFamily.cs
- ChangeDirector.cs
- OracleCommandSet.cs
- AdCreatedEventArgs.cs
- CollectionsUtil.cs
- HMAC.cs
- ValidationHelpers.cs
- FlowLayout.cs
- URL.cs
- DataSourceSelectArguments.cs
- DataGridViewCellStyleChangedEventArgs.cs
- _AutoWebProxyScriptWrapper.cs
- ToolStripMenuItem.cs
- Crypto.cs
- SharedConnectionListener.cs
- PackagingUtilities.cs
- PolicyException.cs
- UserControlAutomationPeer.cs
- GridViewRow.cs
- Filter.cs
- Tool.cs
- ImmComposition.cs
- DisplayClaim.cs
- Int32Rect.cs
- LineUtil.cs
- RoleManagerEventArgs.cs
- PageCatalogPartDesigner.cs
- OleDbStruct.cs
- AutomationElement.cs
- AmbientProperties.cs
- HeaderUtility.cs
- UnsafePeerToPeerMethods.cs
- ImportOptions.cs
- KeyTimeConverter.cs
- InkSerializer.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- HuffCodec.cs
- TypeSystem.cs
- BinaryFormatterWriter.cs
- WebContentFormatHelper.cs
- NotImplementedException.cs
- BrowserCapabilitiesFactoryBase.cs
- TextWriter.cs
- DataObject.cs
- ProfileParameter.cs
- WindowsPrincipal.cs
- WindowsStatic.cs
- ColorBlend.cs
- ToolZoneDesigner.cs
- SoapException.cs
- ImageDrawing.cs
- Content.cs
- SAPIEngineTypes.cs
- WpfMemberInvoker.cs
- SingleKeyFrameCollection.cs
- ToolStripLocationCancelEventArgs.cs
- EDesignUtil.cs
- BinaryUtilClasses.cs
- InternalDispatchObject.cs
- SafeNativeMethods.cs
- Int32Rect.cs
- Evaluator.cs