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
- DataSvcMapFileSerializer.cs
- TypefaceMetricsCache.cs
- PropertyTabChangedEvent.cs
- SyntaxCheck.cs
- ConfigXmlReader.cs
- DbConnectionInternal.cs
- WebEventCodes.cs
- CustomAttribute.cs
- EntityCommand.cs
- FixedSOMPageElement.cs
- ConnectionStringsExpressionBuilder.cs
- GeneralTransform.cs
- XPathItem.cs
- TypeUnloadedException.cs
- RtfToken.cs
- ServiceObjectContainer.cs
- TreeNodeBindingCollection.cs
- AssociationSetMetadata.cs
- Propagator.JoinPropagator.cs
- QuotedStringFormatReader.cs
- PersonalizationStateInfoCollection.cs
- UserNamePasswordValidationMode.cs
- LayoutManager.cs
- RelationalExpressions.cs
- MruCache.cs
- WebPartsPersonalizationAuthorization.cs
- EFDataModelProvider.cs
- TextProperties.cs
- WrappedIUnknown.cs
- BitVector32.cs
- MetabaseReader.cs
- TTSEngineTypes.cs
- RootBrowserWindowProxy.cs
- WeakRefEnumerator.cs
- XmlValueConverter.cs
- DesignTimeTemplateParser.cs
- ZoomPercentageConverter.cs
- Binding.cs
- LoginView.cs
- TableRow.cs
- CodeCommentStatement.cs
- AttributeProviderAttribute.cs
- RelationshipFixer.cs
- DbProviderSpecificTypePropertyAttribute.cs
- HitTestDrawingContextWalker.cs
- CompositeControl.cs
- RuntimeVariablesExpression.cs
- WebOperationContext.cs
- XmlAtomicValue.cs
- XsltContext.cs
- SessionStateSection.cs
- PaintEvent.cs
- SymbolEqualComparer.cs
- Double.cs
- PointCollection.cs
- MultiAsyncResult.cs
- VectorAnimation.cs
- HtmlFormParameterReader.cs
- GeometryModel3D.cs
- BasePattern.cs
- PkcsUtils.cs
- OleAutBinder.cs
- XmlSchemaObjectCollection.cs
- RoleGroup.cs
- SynchronizationContext.cs
- IISUnsafeMethods.cs
- TemplateControlParser.cs
- ServiceReference.cs
- AppearanceEditorPart.cs
- InfoCardTraceRecord.cs
- Typeface.cs
- ThemeDirectoryCompiler.cs
- SignatureResourcePool.cs
- EllipseGeometry.cs
- ScrollItemProviderWrapper.cs
- ListenDesigner.cs
- DSACryptoServiceProvider.cs
- SqlMethodAttribute.cs
- CustomError.cs
- OracleString.cs
- SqlTopReducer.cs
- OperationCanceledException.cs
- basemetadatamappingvisitor.cs
- XmlReaderSettings.cs
- ComponentSerializationService.cs
- GrammarBuilder.cs
- SrgsElementFactory.cs
- ObjectViewEntityCollectionData.cs
- WebPartConnectionsEventArgs.cs
- WindowInteropHelper.cs
- RadioButtonPopupAdapter.cs
- EmptyCollection.cs
- VectorAnimation.cs
- EntityDesignPluralizationHandler.cs
- SQLGuid.cs
- Run.cs
- MailMessage.cs
- Win32.cs
- Console.cs
- xmlglyphRunInfo.cs