Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / OrderedDictionaryStateHelper.cs / 1305376 / 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
- ConfigurationValues.cs
- XmlCharacterData.cs
- SoapTypeAttribute.cs
- RelatedImageListAttribute.cs
- OleDbException.cs
- WSSecurityTokenSerializer.cs
- cookieexception.cs
- Missing.cs
- RegexWorker.cs
- ComponentResourceKeyConverter.cs
- SchemaImporterExtension.cs
- TemplatePartAttribute.cs
- HttpCacheParams.cs
- ConfigurationElement.cs
- EmptyReadOnlyDictionaryInternal.cs
- PeerCustomResolverSettings.cs
- UserPreferenceChangingEventArgs.cs
- LayoutEngine.cs
- LoginCancelEventArgs.cs
- HtmlInputHidden.cs
- ScriptManagerProxy.cs
- CanonicalFontFamilyReference.cs
- ToolStripLabel.cs
- StreamUpgradeInitiator.cs
- DocobjHost.cs
- FileLoadException.cs
- RawAppCommandInputReport.cs
- HebrewCalendar.cs
- ManifestResourceInfo.cs
- Grid.cs
- HttpWebRequestElement.cs
- UriSection.cs
- XmlSchemaComplexType.cs
- OfTypeExpression.cs
- WebEventTraceProvider.cs
- HoistedLocals.cs
- GroupDescription.cs
- pingexception.cs
- MarkupExtensionSerializer.cs
- DataGridViewCellValueEventArgs.cs
- BitmapEffectDrawingContextWalker.cs
- MdiWindowListStrip.cs
- CodeAttributeArgument.cs
- OpenTypeCommon.cs
- WorkflowInstance.cs
- TabControlCancelEvent.cs
- StringBlob.cs
- SqlNamer.cs
- newinstructionaction.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ControlParser.cs
- StrokeNodeEnumerator.cs
- MailAddressCollection.cs
- BamlTreeMap.cs
- BaseAsyncResult.cs
- TranslateTransform.cs
- RemotingConfigParser.cs
- Scalars.cs
- SortedDictionary.cs
- Transform3D.cs
- WindowsFormsHost.cs
- DataGridViewAdvancedBorderStyle.cs
- WpfGeneratedKnownTypes.cs
- Html32TextWriter.cs
- Utility.cs
- EndpointAddressMessageFilterTable.cs
- Slider.cs
- Int32.cs
- VoiceChangeEventArgs.cs
- XappLauncher.cs
- ResourceReferenceKeyNotFoundException.cs
- XPathChildIterator.cs
- Track.cs
- MarshalDirectiveException.cs
- ObjectDataProvider.cs
- AlternateView.cs
- ScriptReference.cs
- PngBitmapDecoder.cs
- SoapAttributeAttribute.cs
- Soap12ProtocolImporter.cs
- ClientBuildManagerCallback.cs
- SmiRequestExecutor.cs
- FontConverter.cs
- InstanceKeyCompleteException.cs
- RequestCacheValidator.cs
- DesignerLoader.cs
- OrthographicCamera.cs
- RefreshEventArgs.cs
- MetadataHelper.cs
- SqlUserDefinedTypeAttribute.cs
- ConditionValidator.cs
- GeneralTransform2DTo3DTo2D.cs
- ReliableSessionBindingElement.cs
- ResourceBinder.cs
- HideDisabledControlAdapter.cs
- ParameterToken.cs
- ImmutableObjectAttribute.cs
- OdbcErrorCollection.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ContainerParaClient.cs