Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Cloud.cs
- WindowsGraphics.cs
- WebHeaderCollection.cs
- DataBindingCollection.cs
- IdnMapping.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- XmlReflectionMember.cs
- CryptoApi.cs
- EnvironmentPermission.cs
- StringValidator.cs
- MenuCommands.cs
- UIElement3DAutomationPeer.cs
- SoapReflector.cs
- DynamicDataRouteHandler.cs
- XmlKeywords.cs
- ProvideValueServiceProvider.cs
- BlurBitmapEffect.cs
- RewritingPass.cs
- InstanceNotReadyException.cs
- DurableOperationAttribute.cs
- SmtpFailedRecipientsException.cs
- EndpointAddress.cs
- VarInfo.cs
- HyperLink.cs
- SendReply.cs
- SoapIncludeAttribute.cs
- ExpandSegment.cs
- Config.cs
- MarshalDirectiveException.cs
- SpellerInterop.cs
- CDSsyncETWBCLProvider.cs
- InterleavedZipPartStream.cs
- GradientBrush.cs
- SurrogateEncoder.cs
- HTTPNotFoundHandler.cs
- CriticalExceptions.cs
- XmlSerializerFormatAttribute.cs
- LoginUtil.cs
- BaseCollection.cs
- MonikerHelper.cs
- SweepDirectionValidation.cs
- NodeFunctions.cs
- DataGridSortCommandEventArgs.cs
- Properties.cs
- StickyNoteContentControl.cs
- ToolStripPanelSelectionBehavior.cs
- X509ChainElement.cs
- ELinqQueryState.cs
- RegexCapture.cs
- SqlColumnizer.cs
- FileSystemEventArgs.cs
- ToolboxDataAttribute.cs
- IFlowDocumentViewer.cs
- XmlSchemaImport.cs
- ListViewInsertedEventArgs.cs
- HtmlInputFile.cs
- VirtualPathUtility.cs
- WsatConfiguration.cs
- DesignerActionItem.cs
- OdbcEnvironmentHandle.cs
- WindowInteropHelper.cs
- CodeCatchClauseCollection.cs
- RoleManagerEventArgs.cs
- CharStorage.cs
- DelegatingMessage.cs
- DbReferenceCollection.cs
- EventProvider.cs
- ColorAnimationBase.cs
- Schema.cs
- UserPreferenceChangedEventArgs.cs
- DataSourceProvider.cs
- Listbox.cs
- Rect3DConverter.cs
- JavascriptCallbackMessageInspector.cs
- Canonicalizers.cs
- DesignerLinkAdapter.cs
- ObjectDataSourceFilteringEventArgs.cs
- SymbolDocumentGenerator.cs
- BinaryQueryOperator.cs
- UDPClient.cs
- FixedFlowMap.cs
- UnauthorizedWebPart.cs
- SQLByte.cs
- ConfigXmlCDataSection.cs
- Int64Storage.cs
- XmlSchemaAnyAttribute.cs
- XmlSchemaObjectTable.cs
- LazyTextWriterCreator.cs
- DescriptionAttribute.cs
- ThumbButtonInfoCollection.cs
- EntityCollection.cs
- ConnectionStringsExpressionBuilder.cs
- ClassDataContract.cs
- PolicyStatement.cs
- RowTypeElement.cs
- ToolStripContentPanel.cs
- PageVisual.cs
- ScriptingAuthenticationServiceSection.cs
- RemoteX509AsymmetricSecurityKey.cs
- PropertyValueUIItem.cs