Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / Mail / TrackingStringDictionary.cs / 1 / TrackingStringDictionary.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { using System; using System.Collections; using System.Collections.Specialized; internal class TrackingStringDictionary : StringDictionary { bool isChanged; bool isReadOnly; internal TrackingStringDictionary() : this(false) { } internal TrackingStringDictionary(bool isReadOnly) { this.isReadOnly = isReadOnly; } internal bool IsChanged { get { return this.isChanged; } set { this.isChanged = value; } } public override void Add(string key, string value) { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base.Add (key, value); this.isChanged = true; } public override void Clear() { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base.Clear (); this.isChanged = true; } public override void Remove(string key) { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base.Remove (key); this.isChanged = true; } public override string this[string key] { get { return base[key]; } set { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base[key] = value; this.isChanged = true; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { using System; using System.Collections; using System.Collections.Specialized; internal class TrackingStringDictionary : StringDictionary { bool isChanged; bool isReadOnly; internal TrackingStringDictionary() : this(false) { } internal TrackingStringDictionary(bool isReadOnly) { this.isReadOnly = isReadOnly; } internal bool IsChanged { get { return this.isChanged; } set { this.isChanged = value; } } public override void Add(string key, string value) { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base.Add (key, value); this.isChanged = true; } public override void Clear() { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base.Clear (); this.isChanged = true; } public override void Remove(string key) { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base.Remove (key); this.isChanged = true; } public override string this[string key] { get { return base[key]; } set { if (this.isReadOnly) throw new InvalidOperationException(SR.GetString(SR.MailCollectionIsReadOnly)); base[key] = value; this.isChanged = true; } } } } // 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
- PolyLineSegment.cs
- XmlStringTable.cs
- newinstructionaction.cs
- InstalledFontCollection.cs
- PeerNameRecordCollection.cs
- GlyphsSerializer.cs
- MatchSingleFxEngineOpcode.cs
- TextProperties.cs
- VisualBasicReference.cs
- MouseGesture.cs
- RadioButtonList.cs
- UnaryOperationBinder.cs
- WindowsListViewSubItem.cs
- ToolStripSplitButton.cs
- KeyTime.cs
- BatchParser.cs
- InheritanceRules.cs
- AssemblyBuilderData.cs
- DbFunctionCommandTree.cs
- XmlSerializerAssemblyAttribute.cs
- BinaryUtilClasses.cs
- XPathMultyIterator.cs
- OleDbFactory.cs
- AppDomainEvidenceFactory.cs
- Avt.cs
- WebPartDescription.cs
- NamespaceQuery.cs
- DataSourceView.cs
- XmlText.cs
- InstanceDataCollectionCollection.cs
- FormViewPagerRow.cs
- Label.cs
- CallSiteBinder.cs
- PackWebResponse.cs
- AddInAttribute.cs
- OleDbReferenceCollection.cs
- InvalidPropValue.cs
- FormsAuthenticationConfiguration.cs
- EventMap.cs
- BinaryFormatter.cs
- LoginUtil.cs
- ListItemConverter.cs
- ZipIOBlockManager.cs
- TreeBuilderBamlTranslator.cs
- SafeFileMappingHandle.cs
- ExportOptions.cs
- ActivityTypeCodeDomSerializer.cs
- Drawing.cs
- TextBox.cs
- XmlCodeExporter.cs
- TdsParameterSetter.cs
- NativeMethods.cs
- DefaultProxySection.cs
- EncoderParameters.cs
- Int16Storage.cs
- ObjectQuery.cs
- HttpContextWrapper.cs
- ConfigurationElement.cs
- TaskbarItemInfo.cs
- RealProxy.cs
- StreamResourceInfo.cs
- UpdateException.cs
- AsymmetricKeyExchangeDeformatter.cs
- ArgumentValidation.cs
- CompilerGeneratedAttribute.cs
- Expr.cs
- StoreAnnotationsMap.cs
- ValueSerializer.cs
- GeneralTransform3DCollection.cs
- DrawingGroup.cs
- Matrix3DValueSerializer.cs
- ResumeStoryboard.cs
- DataConnectionHelper.cs
- TagPrefixAttribute.cs
- hresults.cs
- ResXResourceSet.cs
- FullTextBreakpoint.cs
- PropertyEmitterBase.cs
- HttpModulesSection.cs
- EdmProviderManifest.cs
- DBConnectionString.cs
- ScriptIgnoreAttribute.cs
- BamlRecordReader.cs
- ToolBarTray.cs
- MethodImplAttribute.cs
- SafeCryptoHandles.cs
- PrintDocument.cs
- GeometryCombineModeValidation.cs
- ICspAsymmetricAlgorithm.cs
- HtmlAnchor.cs
- NominalTypeEliminator.cs
- SynchronizationLockException.cs
- ThreadAbortException.cs
- NetworkInformationException.cs
- QuerySettings.cs
- NegationPusher.cs
- RegistryExceptionHelper.cs
- Container.cs
- BoundingRectTracker.cs
- RenderOptions.cs