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
- Variant.cs
- DataGridViewRowsRemovedEventArgs.cs
- DataContractJsonSerializer.cs
- ClientSideProviderDescription.cs
- PolyQuadraticBezierSegment.cs
- MatrixCamera.cs
- EntityTransaction.cs
- PopupEventArgs.cs
- XmlSchemaValidator.cs
- PlatformNotSupportedException.cs
- ResourceDescriptionAttribute.cs
- Border.cs
- HyperLink.cs
- _OverlappedAsyncResult.cs
- PageAsyncTask.cs
- DecoderNLS.cs
- TraceContextEventArgs.cs
- ListView.cs
- SafeArrayTypeMismatchException.cs
- MouseGestureConverter.cs
- DefaultValueAttribute.cs
- ExternalCalls.cs
- ParserHooks.cs
- SecurityContextSecurityTokenParameters.cs
- CodeSnippetStatement.cs
- RoamingStoreFileUtility.cs
- StrokeFIndices.cs
- AttributeConverter.cs
- DataKey.cs
- SQLBinary.cs
- WindowCollection.cs
- DataGridViewCellCollection.cs
- HtmlFormWrapper.cs
- VisualStates.cs
- XmlArrayAttribute.cs
- ConsoleCancelEventArgs.cs
- WindowsListViewItemCheckBox.cs
- PropertyDescriptor.cs
- sqlser.cs
- dbenumerator.cs
- XhtmlConformanceSection.cs
- DispatcherFrame.cs
- MemberJoinTreeNode.cs
- SQLInt32.cs
- ISAPIWorkerRequest.cs
- CfgRule.cs
- KeysConverter.cs
- StringPropertyBuilder.cs
- ToolStripButton.cs
- TreeNodeStyleCollection.cs
- XPathNodeInfoAtom.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- Point3DValueSerializer.cs
- EditingCoordinator.cs
- TypefaceMetricsCache.cs
- XmlBinaryReader.cs
- ProviderUtil.cs
- HtmlHistory.cs
- WebBrowserContainer.cs
- HwndStylusInputProvider.cs
- ComponentDispatcherThread.cs
- ConcurrentQueue.cs
- CaretElement.cs
- UnsafeNativeMethods.cs
- PlatformCulture.cs
- ListBoxItemWrapperAutomationPeer.cs
- FileRecordSequenceHelper.cs
- UnitControl.cs
- IsolatedStorageFilePermission.cs
- ProcessProtocolHandler.cs
- PenLineJoinValidation.cs
- AnchoredBlock.cs
- ControlType.cs
- PieceNameHelper.cs
- HeaderedContentControl.cs
- BoolExpressionVisitors.cs
- CommandTreeTypeHelper.cs
- InheritanceRules.cs
- DesignTimeDataBinding.cs
- WebSysDisplayNameAttribute.cs
- DataService.cs
- COM2PictureConverter.cs
- TrackBarRenderer.cs
- _BasicClient.cs
- OleDbCommandBuilder.cs
- EntityTypeBase.cs
- Highlights.cs
- PersonalizablePropertyEntry.cs
- CriticalHandle.cs
- InheritanceUI.cs
- ExpressionLexer.cs
- CollectionCodeDomSerializer.cs
- LayoutEvent.cs
- OptimalTextSource.cs
- SafeArrayTypeMismatchException.cs
- XmlCountingReader.cs
- UserNameSecurityTokenAuthenticator.cs
- PassportPrincipal.cs
- XmlCharCheckingWriter.cs
- Image.cs