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
- OutputWindow.cs
- DataSourceExpression.cs
- ResizeBehavior.cs
- SafePointer.cs
- CompilationPass2TaskInternal.cs
- VirtualPathData.cs
- Sentence.cs
- RegisteredHiddenField.cs
- ActionFrame.cs
- SqlSelectStatement.cs
- SymDocumentType.cs
- documentation.cs
- StreamSecurityUpgradeInitiator.cs
- ToolStripDropDownClosedEventArgs.cs
- Transform3DGroup.cs
- CreateUserErrorEventArgs.cs
- DynamicExpression.cs
- Dispatcher.cs
- OracleFactory.cs
- AccessText.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SystemColorTracker.cs
- ContentElementAutomationPeer.cs
- WindowsListViewGroup.cs
- FixedSOMTableCell.cs
- KoreanCalendar.cs
- TransactionFilter.cs
- ModuleBuilder.cs
- DataTableClearEvent.cs
- ConstraintCollection.cs
- LinkLabel.cs
- webeventbuffer.cs
- TableCellCollection.cs
- SectionInput.cs
- RunWorkerCompletedEventArgs.cs
- DecoderNLS.cs
- TypeUtil.cs
- DropShadowEffect.cs
- SchemaContext.cs
- TargetException.cs
- precedingsibling.cs
- FileFormatException.cs
- DataGridRowAutomationPeer.cs
- EdmComplexPropertyAttribute.cs
- EntityException.cs
- Model3D.cs
- Form.cs
- StylusOverProperty.cs
- TextBounds.cs
- SqlCacheDependencyDatabaseCollection.cs
- ServiceObjectContainer.cs
- CacheHelper.cs
- HostedElements.cs
- ValidationError.cs
- ResourceAttributes.cs
- ScrollChangedEventArgs.cs
- _SafeNetHandles.cs
- EventSinkActivity.cs
- UnsafeNativeMethods.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- EnumerableRowCollection.cs
- AnnotationComponentChooser.cs
- MissingMethodException.cs
- SerializationHelper.cs
- OleDbError.cs
- BorderGapMaskConverter.cs
- UnsafeNativeMethods.cs
- ChannelServices.cs
- TextEditorSelection.cs
- ToolStripRenderer.cs
- ProtectedConfiguration.cs
- DocumentPageViewAutomationPeer.cs
- ComPersistableTypeElement.cs
- SecurityContext.cs
- KeyedPriorityQueue.cs
- ProfileSettings.cs
- OperationInfoBase.cs
- CodeVariableDeclarationStatement.cs
- UnsafeNativeMethodsCLR.cs
- BaseResourcesBuildProvider.cs
- latinshape.cs
- HyperLink.cs
- UIPropertyMetadata.cs
- KeyedCollection.cs
- DocumentOrderQuery.cs
- PlatformCulture.cs
- PathFigureCollectionValueSerializer.cs
- ExceptionHelpers.cs
- XmlArrayItemAttributes.cs
- TransactionProtocol.cs
- DbExpressionBuilder.cs
- Rules.cs
- DataSourceHelper.cs
- MenuAutoFormat.cs
- SourceFileInfo.cs
- ElementUtil.cs
- SQLByte.cs
- ServicePointManager.cs
- PasswordDeriveBytes.cs
- Stream.cs