Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SQLDateTimeStorage.cs
- VirtualPath.cs
- ObjectDataSourceMethodEventArgs.cs
- Geometry.cs
- Int32CollectionValueSerializer.cs
- StylusButton.cs
- NullReferenceException.cs
- CompositeTypefaceMetrics.cs
- DropShadowBitmapEffect.cs
- WebUtil.cs
- IdentityHolder.cs
- X509SubjectKeyIdentifierClause.cs
- TextCharacters.cs
- ping.cs
- SizeValueSerializer.cs
- OutputCacheProfileCollection.cs
- XamlInt32CollectionSerializer.cs
- DbConnectionInternal.cs
- DeviceContext2.cs
- WindowsListViewItem.cs
- MbpInfo.cs
- HttpModulesSection.cs
- Invariant.cs
- ReaderOutput.cs
- ParentQuery.cs
- RawAppCommandInputReport.cs
- Gdiplus.cs
- ComponentFactoryHelpers.cs
- ChangesetResponse.cs
- Item.cs
- TextMarkerSource.cs
- WebBrowserContainer.cs
- ToolStripOverflowButton.cs
- WindowsRebar.cs
- WindowPattern.cs
- TransformGroup.cs
- UserPrincipalNameElement.cs
- QilName.cs
- CancellationTokenSource.cs
- DataPointer.cs
- CTreeGenerator.cs
- ScriptManagerProxy.cs
- CodePageEncoding.cs
- DefaultAssemblyResolver.cs
- EventItfInfo.cs
- TextComposition.cs
- HandleTable.cs
- ComboBox.cs
- VectorAnimationBase.cs
- ConsoleTraceListener.cs
- ObjectComplexPropertyMapping.cs
- ListBox.cs
- Vector3dCollection.cs
- ObjectDataSourceEventArgs.cs
- KnownIds.cs
- IndentedTextWriter.cs
- ErrorWebPart.cs
- ToolStripScrollButton.cs
- Effect.cs
- ImageFormat.cs
- DataRecordInternal.cs
- MenuTracker.cs
- MetaColumn.cs
- SizeValueSerializer.cs
- BuildProviderCollection.cs
- SqlDataSourceDesigner.cs
- __Filters.cs
- DiagnosticSection.cs
- FontWeightConverter.cs
- RMEnrollmentPage3.cs
- UDPClient.cs
- CrossContextChannel.cs
- CachingParameterInspector.cs
- StorageTypeMapping.cs
- ProxyWebPartConnectionCollection.cs
- PersonalizationStateInfoCollection.cs
- namescope.cs
- StandardCommandToolStripMenuItem.cs
- DESCryptoServiceProvider.cs
- MethodAccessException.cs
- ServiceControllerDesigner.cs
- HTMLTextWriter.cs
- EntityContainerEntitySetDefiningQuery.cs
- XmlEntityReference.cs
- NetPeerTcpBindingCollectionElement.cs
- InputMethod.cs
- VirtualDirectoryMappingCollection.cs
- MsdtcWrapper.cs
- DeviceContexts.cs
- AccessDataSourceView.cs
- GridViewSelectEventArgs.cs
- DomainLiteralReader.cs
- filewebresponse.cs
- figurelengthconverter.cs
- DecoderFallback.cs
- SqlTrackingService.cs
- LockCookie.cs
- XmlFormatExtensionAttribute.cs
- Grant.cs
- TripleDESCryptoServiceProvider.cs