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
- WebBrowser.cs
- WindowsListViewScroll.cs
- XamlSerializer.cs
- StructuredTypeInfo.cs
- MenuItemStyle.cs
- DockProviderWrapper.cs
- PageCache.cs
- TiffBitmapEncoder.cs
- RightsManagementEncryptedStream.cs
- Content.cs
- ReachIDocumentPaginatorSerializerAsync.cs
- DataColumnMapping.cs
- DataKey.cs
- StringValueSerializer.cs
- ConnectionPoint.cs
- PersianCalendar.cs
- WindowsComboBox.cs
- ClientCredentialsSecurityTokenManager.cs
- TextTreeUndo.cs
- RunClient.cs
- SqlWebEventProvider.cs
- DataSetFieldSchema.cs
- PathBox.cs
- UpdatePanel.cs
- BufferedReadStream.cs
- DataBoundControl.cs
- Cell.cs
- ContainerControl.cs
- RichTextBox.cs
- PersonalizationProvider.cs
- BuildDependencySet.cs
- NamespaceDisplay.xaml.cs
- ToolbarAUtomationPeer.cs
- SerializationFieldInfo.cs
- WorkflowRuntimeServiceElementCollection.cs
- XmlSchemaImporter.cs
- FormClosingEvent.cs
- KeyTime.cs
- LocalizedNameDescriptionPair.cs
- SmtpTransport.cs
- SequenceNumber.cs
- ExpandSegmentCollection.cs
- PathBox.cs
- SerializationHelper.cs
- QueryProcessor.cs
- TextRangeProviderWrapper.cs
- DataGridViewCellFormattingEventArgs.cs
- HttpModuleCollection.cs
- SamlAttribute.cs
- FamilyMapCollection.cs
- TableParaClient.cs
- ThrowHelper.cs
- SyntaxCheck.cs
- EmissiveMaterial.cs
- TdsRecordBufferSetter.cs
- SelectionProviderWrapper.cs
- ToolBar.cs
- EventPrivateKey.cs
- SystemGatewayIPAddressInformation.cs
- WebHttpSecurity.cs
- UIElementCollection.cs
- CSharpCodeProvider.cs
- ISAPIApplicationHost.cs
- DependencySource.cs
- BinaryConverter.cs
- SqlGenerator.cs
- SqlException.cs
- BrowserDefinitionCollection.cs
- XhtmlBasicPanelAdapter.cs
- HttpHeaderCollection.cs
- ReflectEventDescriptor.cs
- MetadataItemCollectionFactory.cs
- BitSet.cs
- ChangeInterceptorAttribute.cs
- ListViewCommandEventArgs.cs
- ResourceAssociationTypeEnd.cs
- XmlSchemaSimpleContentExtension.cs
- DebugView.cs
- Size3D.cs
- DataGridViewIntLinkedList.cs
- KeyFrames.cs
- ValuePatternIdentifiers.cs
- RedBlackList.cs
- ColumnResizeUndoUnit.cs
- PassportAuthentication.cs
- XamlHostingSection.cs
- TaskFormBase.cs
- AsyncOperation.cs
- SortQueryOperator.cs
- FormParameter.cs
- RandomDelaySendsAsyncResult.cs
- OpCellTreeNode.cs
- StorageEndPropertyMapping.cs
- RightsManagementEncryptedStream.cs
- TreeViewImageKeyConverter.cs
- TypeSemantics.cs
- CuspData.cs
- ReceiveActivityDesigner.cs
- StrongName.cs
- HTMLTagNameToTypeMapper.cs