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
- PointConverter.cs
- CheckBox.cs
- XhtmlBasicListAdapter.cs
- ModelFunctionTypeElement.cs
- OperationAbortedException.cs
- StructuralCache.cs
- XmlAnyElementAttribute.cs
- ControlType.cs
- CodeArrayCreateExpression.cs
- EFColumnProvider.cs
- BezierSegment.cs
- TableLayoutPanelDesigner.cs
- GroupItem.cs
- ZipIOCentralDirectoryBlock.cs
- WindowAutomationPeer.cs
- EnumValAlphaComparer.cs
- CodeStatement.cs
- SqlUtils.cs
- SwitchElementsCollection.cs
- SetStoryboardSpeedRatio.cs
- DataGridSortCommandEventArgs.cs
- ScrollChangedEventArgs.cs
- TextStore.cs
- NativeRightsManagementAPIsStructures.cs
- PropertyDescriptor.cs
- EdgeProfileValidation.cs
- ToolboxItemCollection.cs
- WindowsScrollBar.cs
- CustomCredentialPolicy.cs
- ActivityMarkupSerializer.cs
- JsonGlobals.cs
- TraceRecord.cs
- UIAgentRequest.cs
- contentDescriptor.cs
- SmiEventSink_Default.cs
- ImageCollectionCodeDomSerializer.cs
- DictationGrammar.cs
- TabControlAutomationPeer.cs
- CheckPair.cs
- ProgressBarHighlightConverter.cs
- XPathArrayIterator.cs
- DataGridViewImageColumn.cs
- MarginsConverter.cs
- ResourceExpressionBuilder.cs
- OptimizedTemplateContent.cs
- ExpressionConverter.cs
- XPathArrayIterator.cs
- PenThread.cs
- TempFiles.cs
- EntityProviderServices.cs
- LogicalMethodInfo.cs
- HideDisabledControlAdapter.cs
- LOSFormatter.cs
- BidirectionalDictionary.cs
- Axis.cs
- LocalizableAttribute.cs
- TraceRecord.cs
- MethodCallConverter.cs
- DetailsViewDeleteEventArgs.cs
- DoubleAnimationBase.cs
- TypeKeyValue.cs
- InvalidEnumArgumentException.cs
- DataPager.cs
- ServiceHostingEnvironmentSection.cs
- FilterFactory.cs
- DecimalFormatter.cs
- InternalException.cs
- BrowserCapabilitiesFactory.cs
- SecurityContext.cs
- Bits.cs
- ScrollItemPatternIdentifiers.cs
- CompModSwitches.cs
- ResourceDescriptionAttribute.cs
- CodeArrayIndexerExpression.cs
- Win32.cs
- LayoutExceptionEventArgs.cs
- HtmlHead.cs
- ObfuscateAssemblyAttribute.cs
- AuthenticateEventArgs.cs
- SchemaElementDecl.cs
- CodeTypeOfExpression.cs
- WorkflowMessageEventHandler.cs
- GroupBoxRenderer.cs
- Calendar.cs
- WebPartVerb.cs
- HandledEventArgs.cs
- CompilerError.cs
- MediaPlayerState.cs
- IntegrationExceptionEventArgs.cs
- CodeSubDirectoriesCollection.cs
- Publisher.cs
- WsdlBuildProvider.cs
- OdbcException.cs
- ContentFilePart.cs
- TableRowCollection.cs
- XmlSchemaImporter.cs
- ImportContext.cs
- XamlStream.cs
- ExceptionValidationRule.cs
- PolyLineSegment.cs