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
- ConfigXmlAttribute.cs
- _NtlmClient.cs
- DbConnectionPoolCounters.cs
- Command.cs
- GenericEnumConverter.cs
- WebServiceParameterData.cs
- DesignTimeDataBinding.cs
- IEnumerable.cs
- DataRecordInternal.cs
- TabletDeviceInfo.cs
- PropertyGridEditorPart.cs
- RuleSettingsCollection.cs
- ClientProtocol.cs
- SHA1Managed.cs
- Debug.cs
- DataBindingHandlerAttribute.cs
- BitmapEffectDrawingContextWalker.cs
- WsatConfiguration.cs
- DocumentPageView.cs
- File.cs
- SByte.cs
- TextParentUndoUnit.cs
- TdsParserStaticMethods.cs
- TokenBasedSet.cs
- TagMapCollection.cs
- BlockExpression.cs
- ToolBarButtonClickEvent.cs
- TrackBarRenderer.cs
- AQNBuilder.cs
- ObjectListItemCollection.cs
- PropertyChangeTracker.cs
- SudsCommon.cs
- Region.cs
- ArgumentNullException.cs
- AdvancedBindingEditor.cs
- SafeRightsManagementEnvironmentHandle.cs
- ToolStripContainer.cs
- NavigationPropertySingletonExpression.cs
- NetMsmqBindingElement.cs
- __ConsoleStream.cs
- ListBoxItem.cs
- FormCollection.cs
- Zone.cs
- TypeNameConverter.cs
- Avt.cs
- BindMarkupExtensionSerializer.cs
- StructuredTypeEmitter.cs
- MessageBox.cs
- Frame.cs
- PropertyEntry.cs
- ContainerControlDesigner.cs
- TreeViewImageKeyConverter.cs
- AccessedThroughPropertyAttribute.cs
- Documentation.cs
- DeviceSpecificDialogCachedState.cs
- CodeTypeMember.cs
- FileUpload.cs
- EmptyTextWriter.cs
- EntityExpressionVisitor.cs
- WebPartConnectionsConnectVerb.cs
- OptimalBreakSession.cs
- XmlSchemaDatatype.cs
- TemplateField.cs
- HiddenField.cs
- ContainerTracking.cs
- ElementNotAvailableException.cs
- TextTreeText.cs
- EntityModelSchemaGenerator.cs
- XmlQueryContext.cs
- Mapping.cs
- CatalogUtil.cs
- WebPartEventArgs.cs
- BasicHttpBinding.cs
- SqlWriter.cs
- ClientEventManager.cs
- StructuralType.cs
- XNodeValidator.cs
- CodeSnippetExpression.cs
- DashStyle.cs
- SQLMoney.cs
- TextStore.cs
- WebOperationContext.cs
- ValidatingPropertiesEventArgs.cs
- LogArchiveSnapshot.cs
- EncoderExceptionFallback.cs
- BevelBitmapEffect.cs
- ConnectionStringsExpressionBuilder.cs
- DataBoundControlHelper.cs
- ImageAnimator.cs
- OdbcErrorCollection.cs
- WebSysDisplayNameAttribute.cs
- ThicknessAnimationUsingKeyFrames.cs
- RsaSecurityToken.cs
- X509CertificateTrustedIssuerElement.cs
- OpCodes.cs
- CorrelationInitializer.cs
- ToolStripButton.cs
- DbXmlEnabledProviderManifest.cs
- CodeMemberEvent.cs
- ObjectContext.cs