Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TailPinnedEventArgs.cs
- EdmSchemaError.cs
- ToolBarButtonClickEvent.cs
- PropertyChangedEventArgs.cs
- AsyncOperationManager.cs
- MappedMetaModel.cs
- UIElementParaClient.cs
- CompilationLock.cs
- CmsInterop.cs
- SystemGatewayIPAddressInformation.cs
- HttpListenerRequest.cs
- CornerRadiusConverter.cs
- ActiveXMessageFormatter.cs
- PathSegment.cs
- TextPattern.cs
- FastEncoder.cs
- ArrayWithOffset.cs
- RoleServiceManager.cs
- BufferBuilder.cs
- SmiContextFactory.cs
- ItemAutomationPeer.cs
- CommonObjectSecurity.cs
- FocusWithinProperty.cs
- TypedElement.cs
- Viewport3DVisual.cs
- DummyDataSource.cs
- Trace.cs
- SystemDiagnosticsSection.cs
- SamlConstants.cs
- UTF8Encoding.cs
- DataGridViewCellStyle.cs
- Root.cs
- NameNode.cs
- DataGridViewCellStateChangedEventArgs.cs
- Main.cs
- SettingsPropertyWrongTypeException.cs
- TextEditorDragDrop.cs
- ConfigurationManagerInternalFactory.cs
- ExpressionReplacer.cs
- BindingElementExtensionElement.cs
- ImageList.cs
- Converter.cs
- DynamicUpdateCommand.cs
- Wizard.cs
- GeometryValueSerializer.cs
- AssemblyBuilder.cs
- BitFlagsGenerator.cs
- WebBaseEventKeyComparer.cs
- PolyBezierSegmentFigureLogic.cs
- DurableInstanceProvider.cs
- WebPartExportVerb.cs
- GeometryModel3D.cs
- SqlCommandSet.cs
- StyleModeStack.cs
- MessageQueuePermissionEntryCollection.cs
- EtwTrace.cs
- XPathDescendantIterator.cs
- IItemContainerGenerator.cs
- DnsPermission.cs
- Primitive.cs
- DocumentsTrace.cs
- ServiceControllerDesigner.cs
- CustomTypeDescriptor.cs
- SoapExtensionTypeElementCollection.cs
- OutOfMemoryException.cs
- SqlDataSourceFilteringEventArgs.cs
- HttpListenerResponse.cs
- CacheMemory.cs
- FunctionParameter.cs
- ForAllOperator.cs
- ServiceProviders.cs
- KeyProperty.cs
- CodeCompiler.cs
- DbProviderFactory.cs
- GenericAuthenticationEventArgs.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- HMACSHA384.cs
- RectAnimation.cs
- TableLayout.cs
- RawMouseInputReport.cs
- DetailsViewUpdateEventArgs.cs
- RoleGroupCollectionEditor.cs
- AuthenticatedStream.cs
- SecurityPolicySection.cs
- ActivityExecutorDelegateInfo.cs
- TextContainerHelper.cs
- PageTheme.cs
- SQLConvert.cs
- HeaderedContentControl.cs
- KnownTypesHelper.cs
- RootAction.cs
- ClientRuntimeConfig.cs
- PartialTrustVisibleAssembliesSection.cs
- ResourceReferenceExpressionConverter.cs
- SkewTransform.cs
- UserPrincipalNameElement.cs
- WebPartVerbsEventArgs.cs
- EntityDataSourceMemberPath.cs
- TextEffect.cs
- RecognizedPhrase.cs