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
- RTLAwareMessageBox.cs
- HttpWrapper.cs
- BufferedReadStream.cs
- CollectionCodeDomSerializer.cs
- SafeArrayTypeMismatchException.cs
- AlternateView.cs
- OdbcConnectionFactory.cs
- MarshalByRefObject.cs
- FloaterParagraph.cs
- CurrencyManager.cs
- StructuredTypeEmitter.cs
- SerializableReadOnlyDictionary.cs
- GridViewSelectEventArgs.cs
- ContextMenu.cs
- EventRecord.cs
- HighContrastHelper.cs
- GenericTypeParameterBuilder.cs
- StrongTypingException.cs
- StrongName.cs
- MtomMessageEncodingBindingElement.cs
- RemoteAsymmetricSignatureFormatter.cs
- SqlDeflator.cs
- Parser.cs
- AssemblyInfo.cs
- TextMarkerSource.cs
- ScrollViewerAutomationPeer.cs
- MouseActionValueSerializer.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- ParsedAttributeCollection.cs
- HttpSysSettings.cs
- Listbox.cs
- ListViewItem.cs
- SqlConnectionPoolProviderInfo.cs
- LingerOption.cs
- TextReader.cs
- FileVersion.cs
- XmlSecureResolver.cs
- WindowsEditBoxRange.cs
- VariableQuery.cs
- TraceInternal.cs
- AxHost.cs
- CustomPopupPlacement.cs
- Contracts.cs
- ToolStripItem.cs
- WebPartConnectionsCancelVerb.cs
- SelectionRangeConverter.cs
- LogicalMethodInfo.cs
- FileSecurity.cs
- LoadMessageLogger.cs
- IPipelineRuntime.cs
- UpdateManifestForBrowserApplication.cs
- OleDbConnection.cs
- GraphicsState.cs
- WebPartConnectionCollection.cs
- DesignTimeTemplateParser.cs
- ErrorBehavior.cs
- Vector3DValueSerializer.cs
- XmlChildEnumerator.cs
- RecipientInfo.cs
- SwitchLevelAttribute.cs
- RegisteredArrayDeclaration.cs
- COM2PropertyDescriptor.cs
- CommonObjectSecurity.cs
- IntSecurity.cs
- ProfilePropertySettingsCollection.cs
- ProgressBarRenderer.cs
- MLangCodePageEncoding.cs
- ExecutionEngineException.cs
- XmlWrappingReader.cs
- RsaSecurityToken.cs
- UnsafeNativeMethods.cs
- Visual3D.cs
- PasswordTextContainer.cs
- Converter.cs
- CorrelationValidator.cs
- RelationshipConverter.cs
- ConfigErrorGlyph.cs
- DLinqAssociationProvider.cs
- sortedlist.cs
- HttpResponseHeader.cs
- Triplet.cs
- BasicKeyConstraint.cs
- AccessDataSourceView.cs
- GenericUI.cs
- OracleException.cs
- LabelLiteral.cs
- DataIdProcessor.cs
- MimeParameterWriter.cs
- DataGridColumn.cs
- FlowchartDesigner.Helpers.cs
- ExpressionQuoter.cs
- Timer.cs
- XmlSchemaAny.cs
- OdbcConnectionPoolProviderInfo.cs
- JournalEntryStack.cs
- MissingMethodException.cs
- BasePropertyDescriptor.cs
- PropertyTab.cs
- ValidationRuleCollection.cs
- Annotation.cs