Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / AlternateViewCollection.cs / 1 / AlternateViewCollection.cs
using System; using System.Collections.ObjectModel; namespace System.Net.Mail { public sealed class AlternateViewCollection : Collection, IDisposable { bool disposed = false; internal AlternateViewCollection() { } public void Dispose() { if (disposed) { return; } foreach (AlternateView view in this) { view.Dispose(); } Clear(); disposed = true; } protected override void RemoveItem(int index){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } base.RemoveItem(index); } protected override void ClearItems(){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } base.ClearItems(); } protected override void SetItem(int index, AlternateView item){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } if(item==null) { throw new ArgumentNullException("item"); } base.SetItem(index,item); } protected override void InsertItem(int index, AlternateView item){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } if(item==null){ throw new ArgumentNullException("item"); } base.InsertItem(index,item); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ProfileEventArgs.cs
- XPathItem.cs
- ContainerControl.cs
- Attributes.cs
- SqlCrossApplyToCrossJoin.cs
- QilReference.cs
- ScriptManagerProxy.cs
- ProfilePropertySettings.cs
- CheckPair.cs
- PropertyInformationCollection.cs
- QilIterator.cs
- VirtualPath.cs
- ViewCellRelation.cs
- TextFindEngine.cs
- DynamicVirtualDiscoSearcher.cs
- GlyphRunDrawing.cs
- PathFigureCollection.cs
- DataGridViewAddColumnDialog.cs
- ByValueEqualityComparer.cs
- WebServiceEndpoint.cs
- TextBoxLine.cs
- FileDialog.cs
- RawStylusInput.cs
- Utility.cs
- Executor.cs
- StorageSetMapping.cs
- AutoGeneratedFieldProperties.cs
- Context.cs
- Span.cs
- DataServiceQueryContinuation.cs
- InputScopeConverter.cs
- Helpers.cs
- contentDescriptor.cs
- TreeNodeBinding.cs
- shaperfactory.cs
- _FtpControlStream.cs
- FacetDescription.cs
- BamlRecordReader.cs
- MetadataWorkspace.cs
- ScriptBehaviorDescriptor.cs
- Util.cs
- BamlResourceContent.cs
- ExtendedProperty.cs
- FormattedText.cs
- UriExt.cs
- ByteAnimationUsingKeyFrames.cs
- CreationContext.cs
- StringCollection.cs
- StringAnimationBase.cs
- GridViewAutomationPeer.cs
- FieldTemplateFactory.cs
- CodeDelegateCreateExpression.cs
- TransformProviderWrapper.cs
- PrePrepareMethodAttribute.cs
- SamlAuthorizationDecisionClaimResource.cs
- COM2Enum.cs
- ILGen.cs
- ReferentialConstraintRoleElement.cs
- PtsPage.cs
- ProvidersHelper.cs
- QueryableDataSourceView.cs
- BackgroundFormatInfo.cs
- PlatformNotSupportedException.cs
- WebPartExportVerb.cs
- SchemeSettingElementCollection.cs
- ClientProxyGenerator.cs
- TabControl.cs
- DataGridPageChangedEventArgs.cs
- ByteStorage.cs
- InfoCardKeyedHashAlgorithm.cs
- HashJoinQueryOperatorEnumerator.cs
- DataGridViewCellConverter.cs
- GeneralTransformCollection.cs
- Metafile.cs
- EnlistmentTraceIdentifier.cs
- List.cs
- RemoveStoryboard.cs
- DiscoveryReferences.cs
- TextParagraph.cs
- ChangeTracker.cs
- DeclaredTypeValidator.cs
- StdValidatorsAndConverters.cs
- GradientBrush.cs
- WebPartTransformer.cs
- DataSourceExpression.cs
- Pen.cs
- LiteralControl.cs
- PopupRootAutomationPeer.cs
- ExpressionsCollectionEditor.cs
- ButtonRenderer.cs
- CachedResourceDictionaryExtension.cs
- X509CertificateValidator.cs
- documentsequencetextpointer.cs
- WorkflowRuntimeServiceElementCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- Vector3DConverter.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- Merger.cs
- EncoderReplacementFallback.cs
- HwndSourceParameters.cs