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
- SessionIDManager.cs
- EmissiveMaterial.cs
- DtrList.cs
- XslVisitor.cs
- TypeLoadException.cs
- ReachPageContentCollectionSerializerAsync.cs
- InvalidOleVariantTypeException.cs
- PersistStreamTypeWrapper.cs
- CompiledRegexRunner.cs
- ExpressionPrefixAttribute.cs
- PromptBuilder.cs
- TextTreeNode.cs
- SqlDelegatedTransaction.cs
- XmlParserContext.cs
- ConfigsHelper.cs
- Drawing.cs
- UpDownEvent.cs
- InternalConfigEventArgs.cs
- ComponentDispatcher.cs
- ExtensionDataReader.cs
- StructuredTypeInfo.cs
- WmpBitmapEncoder.cs
- TimeSpanSecondsConverter.cs
- ComboBox.cs
- BuildProvidersCompiler.cs
- EditBehavior.cs
- SiteMapNodeCollection.cs
- EventProvider.cs
- ComplexObject.cs
- FormClosingEvent.cs
- OpacityConverter.cs
- Regex.cs
- Barrier.cs
- TdsParserSessionPool.cs
- Model3DCollection.cs
- InterleavedZipPartStream.cs
- DomainUpDown.cs
- RNGCryptoServiceProvider.cs
- UriTemplateHelpers.cs
- odbcmetadatafactory.cs
- SQLBytesStorage.cs
- DocumentSchemaValidator.cs
- ItemsControl.cs
- NameTable.cs
- XmlILModule.cs
- QueryCursorEventArgs.cs
- ViewKeyConstraint.cs
- QueryTreeBuilder.cs
- HybridDictionary.cs
- RuntimeHelpers.cs
- DependencyObjectPropertyDescriptor.cs
- FlatButtonAppearance.cs
- MaskedTextProvider.cs
- ListItemCollection.cs
- HttpRequest.cs
- DelegateSerializationHolder.cs
- Codec.cs
- DataPagerFieldItem.cs
- COSERVERINFO.cs
- ArithmeticException.cs
- complextypematerializer.cs
- AnimatedTypeHelpers.cs
- MappingException.cs
- BitmapEffectRenderDataResource.cs
- CodeLinePragma.cs
- ConfigurationPropertyAttribute.cs
- CornerRadiusConverter.cs
- TemplateParser.cs
- DataSourceProvider.cs
- TimeoutValidationAttribute.cs
- HotCommands.cs
- LogExtentCollection.cs
- TypeDescriptionProviderAttribute.cs
- SectionInformation.cs
- ProfileService.cs
- VectorCollectionValueSerializer.cs
- TreeNodeClickEventArgs.cs
- CheckPair.cs
- SqlClientPermission.cs
- MenuItemBinding.cs
- TextContainerChangedEventArgs.cs
- X509Chain.cs
- MatcherBuilder.cs
- SqlDependency.cs
- DesignerAutoFormatCollection.cs
- DetailsViewPageEventArgs.cs
- HwndStylusInputProvider.cs
- ResourceDictionaryCollection.cs
- ObjectItemLoadingSessionData.cs
- ReadOnlyMetadataCollection.cs
- Label.cs
- ConfigXmlReader.cs
- RecommendedAsConfigurableAttribute.cs
- SimpleMailWebEventProvider.cs
- DefaultValueAttribute.cs
- CannotUnloadAppDomainException.cs
- XmlFormatExtensionPrefixAttribute.cs
- MsmqTransportReceiveParameters.cs
- ListGeneralPage.cs
- FormatterConverter.cs