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
- DynamicPropertyHolder.cs
- TextOptionsInternal.cs
- EntityEntry.cs
- DataBinding.cs
- DbException.cs
- SqlMethodCallConverter.cs
- DataGridViewTextBoxEditingControl.cs
- AffineTransform3D.cs
- ApplicationSecurityManager.cs
- FindCriteriaElement.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- IconConverter.cs
- IdnElement.cs
- HeaderedContentControl.cs
- WSHttpBindingBaseElement.cs
- GrammarBuilderPhrase.cs
- ReturnValue.cs
- UIElementParaClient.cs
- XPathAncestorQuery.cs
- RemotingException.cs
- Baml6ConstructorInfo.cs
- CompiledIdentityConstraint.cs
- DiscreteKeyFrames.cs
- SqlCachedBuffer.cs
- DateTimeOffsetStorage.cs
- EntityDataSourceReferenceGroup.cs
- QuaternionRotation3D.cs
- DataSvcMapFileSerializer.cs
- PriorityQueue.cs
- WebPartsSection.cs
- ObjectDisposedException.cs
- ContextConfiguration.cs
- MediaContext.cs
- PropertyItemInternal.cs
- XmlQueryOutput.cs
- BindingWorker.cs
- __Error.cs
- SchemaComplexType.cs
- UnmanagedMemoryStreamWrapper.cs
- TextServicesCompartment.cs
- Point3DAnimationUsingKeyFrames.cs
- CfgParser.cs
- ProfilePropertyMetadata.cs
- DataGridViewColumnTypePicker.cs
- HtmlControl.cs
- ArrayWithOffset.cs
- ColorMatrix.cs
- VScrollProperties.cs
- PreviousTrackingServiceAttribute.cs
- Compiler.cs
- UTF32Encoding.cs
- ChangeBlockUndoRecord.cs
- TreeNode.cs
- WriteableBitmap.cs
- CalendarSelectionChangedEventArgs.cs
- ObjectListCommand.cs
- WindowsImpersonationContext.cs
- ScriptManager.cs
- ValidatorCompatibilityHelper.cs
- AnnotationAuthorChangedEventArgs.cs
- PieceDirectory.cs
- Keywords.cs
- ColorContext.cs
- AuthenticationService.cs
- LoginName.cs
- OdbcException.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DataPagerCommandEventArgs.cs
- KeyboardEventArgs.cs
- MatrixKeyFrameCollection.cs
- TextDocumentView.cs
- BitmapDecoder.cs
- XslTransform.cs
- WorkflowServiceBuildProvider.cs
- PrinterResolution.cs
- SchemaImporter.cs
- HMAC.cs
- Scheduler.cs
- HashJoinQueryOperatorEnumerator.cs
- CodeSubDirectory.cs
- WebPartAddingEventArgs.cs
- KeyToListMap.cs
- SQLChars.cs
- MatrixTransform3D.cs
- SqlGatherProducedAliases.cs
- Main.cs
- BindingBase.cs
- TableParaClient.cs
- ObjectViewEntityCollectionData.cs
- TryCatch.cs
- ListBindingHelper.cs
- NegationPusher.cs
- DispatcherTimer.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ToolTipAutomationPeer.cs
- DataGridLengthConverter.cs
- Ref.cs
- SerializationInfo.cs
- DynamicAttribute.cs
- ToolBarOverflowPanel.cs