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
- BamlRecordWriter.cs
- panel.cs
- HttpCacheParams.cs
- WsatProxy.cs
- RuleValidation.cs
- BrowserCapabilitiesCodeGenerator.cs
- BitSet.cs
- EmbeddedMailObject.cs
- ZipArchive.cs
- ListBoxItemWrapperAutomationPeer.cs
- InkCanvasAutomationPeer.cs
- DockProviderWrapper.cs
- FileDialog.cs
- ClosableStream.cs
- AdRotator.cs
- MediaPlayerState.cs
- PermissionSetEnumerator.cs
- SqlLiftIndependentRowExpressions.cs
- GlobalizationAssembly.cs
- CustomValidator.cs
- StreamGeometryContext.cs
- GridViewColumnHeaderAutomationPeer.cs
- Models.cs
- Transform3DCollection.cs
- ReadOnlyNameValueCollection.cs
- WebEventCodes.cs
- SoapIgnoreAttribute.cs
- ExpressionNode.cs
- NumberAction.cs
- _NtlmClient.cs
- WindowsListView.cs
- XmlSchemaAnnotation.cs
- SmtpFailedRecipientException.cs
- SamlAttributeStatement.cs
- EditingCommands.cs
- wmiprovider.cs
- ProgressBarHighlightConverter.cs
- MenuEventArgs.cs
- basenumberconverter.cs
- StructuralType.cs
- DecoratedNameAttribute.cs
- PageBreakRecord.cs
- InvalidDocumentContentsException.cs
- MetadataReference.cs
- PerspectiveCamera.cs
- StoreItemCollection.Loader.cs
- DetailsViewDeleteEventArgs.cs
- StartUpEventArgs.cs
- GlyphRun.cs
- ConvertEvent.cs
- Clause.cs
- EntityViewContainer.cs
- PageWrapper.cs
- ReadWriteSpinLock.cs
- DependencyPropertyKey.cs
- RegexStringValidator.cs
- WorkflowRuntimeSection.cs
- DescendantQuery.cs
- Site.cs
- printdlgexmarshaler.cs
- BinaryMessageEncoder.cs
- AmbientLight.cs
- HttpHostedTransportConfiguration.cs
- ParseHttpDate.cs
- AcceleratedTokenProvider.cs
- FtpWebResponse.cs
- ObjectDataSourceChooseTypePanel.cs
- PolyLineSegment.cs
- PropertyGridCommands.cs
- CqlQuery.cs
- SpellerHighlightLayer.cs
- Thread.cs
- BoundColumn.cs
- VariableModifiersHelper.cs
- DbConnectionInternal.cs
- ButtonFieldBase.cs
- StyleSelector.cs
- SelectionGlyphBase.cs
- wmiprovider.cs
- WorkerRequest.cs
- EnumCodeDomSerializer.cs
- StoreItemCollection.cs
- ExtendedProtectionPolicyElement.cs
- ReliableMessagingHelpers.cs
- SqlException.cs
- MarginCollapsingState.cs
- Pts.cs
- PingReply.cs
- WebPartCollection.cs
- DataProviderNameConverter.cs
- LinkLabel.cs
- ToggleButton.cs
- PlatformNotSupportedException.cs
- SystemDiagnosticsSection.cs
- TemplatedWizardStep.cs
- ZipIOFileItemStream.cs
- BlurEffect.cs
- TextRangeAdaptor.cs
- HiddenField.cs
- XamlStyleSerializer.cs