Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Mail / TrackingStringDictionary.cs / 1305376 / 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
- SwitchLevelAttribute.cs
- NativeMethods.cs
- ControlCollection.cs
- Clause.cs
- COM2IPerPropertyBrowsingHandler.cs
- Adorner.cs
- SamlAuthenticationStatement.cs
- AppDomainUnloadedException.cs
- PkcsMisc.cs
- UnsafeNativeMethods.cs
- FileNotFoundException.cs
- DeviceSpecificChoice.cs
- WorkflowValidationFailedException.cs
- NetCodeGroup.cs
- XhtmlConformanceSection.cs
- ControlCachePolicy.cs
- ActivationServices.cs
- CommonDialog.cs
- ApplicationProxyInternal.cs
- XmlExtensionFunction.cs
- StaticTextPointer.cs
- TransformerConfigurationWizardBase.cs
- IDReferencePropertyAttribute.cs
- GlyphRunDrawing.cs
- SpellerHighlightLayer.cs
- TypeDescriptionProvider.cs
- ConvertTextFrag.cs
- Vars.cs
- TrackingServices.cs
- WebReferencesBuildProvider.cs
- MetadataPropertyCollection.cs
- ThicknessConverter.cs
- DocumentSequence.cs
- FormView.cs
- SerializationInfo.cs
- Decimal.cs
- Lease.cs
- ToolStripPanelSelectionBehavior.cs
- OutputCacheSection.cs
- ItemAutomationPeer.cs
- SoapExtensionStream.cs
- RelationshipEndMember.cs
- KeyGesture.cs
- AssemblyBuilder.cs
- Filter.cs
- ManipulationInertiaStartingEventArgs.cs
- WorkingDirectoryEditor.cs
- OleDbRowUpdatingEvent.cs
- StronglyTypedResourceBuilder.cs
- CodeNamespace.cs
- UnaryNode.cs
- ClientTargetSection.cs
- ComboBox.cs
- ComponentChangedEvent.cs
- Table.cs
- LocalizeDesigner.cs
- FlagsAttribute.cs
- CodeGroup.cs
- MemberDescriptor.cs
- CompilerGeneratedAttribute.cs
- CalendarDay.cs
- Part.cs
- DataBoundControl.cs
- TextBoxBaseDesigner.cs
- IndexedGlyphRun.cs
- TraceHwndHost.cs
- HttpApplicationFactory.cs
- DSACryptoServiceProvider.cs
- ArgumentOutOfRangeException.cs
- SafeSecurityHelper.cs
- sortedlist.cs
- XmlEnumAttribute.cs
- FrameAutomationPeer.cs
- FieldBuilder.cs
- ClientEventManager.cs
- SafeRightsManagementPubHandle.cs
- ObjectCloneHelper.cs
- ComboBox.cs
- ListBindableAttribute.cs
- WorkflowServiceAttributes.cs
- HtmlTextArea.cs
- TextParagraph.cs
- StrokeCollectionConverter.cs
- HasCopySemanticsAttribute.cs
- ConsoleKeyInfo.cs
- ObjectDataSourceSelectingEventArgs.cs
- WebPartConnectionsEventArgs.cs
- Splitter.cs
- SqlPersonalizationProvider.cs
- ServiceProviders.cs
- Permission.cs
- UnsafePeerToPeerMethods.cs
- Timeline.cs
- RelationshipEndMember.cs
- PointAnimationUsingKeyFrames.cs
- SafeNativeMethods.cs
- BatchServiceHost.cs
- Visual3D.cs
- CultureInfoConverter.cs
- ExpressionValueEditor.cs