Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / SmtpFailedRecipientsException.cs / 1 / SmtpFailedRecipientsException.cs
using System; using System.Collections; using System.Runtime.Serialization; using System.Security.Permissions; namespace System.Net.Mail { ////// Summary description for SmtpFailedRecipientsException. /// [Serializable] public class SmtpFailedRecipientsException : SmtpFailedRecipientException, ISerializable { SmtpFailedRecipientException[] innerExceptions; // FxCop public SmtpFailedRecipientsException() { innerExceptions = new SmtpFailedRecipientException[0]; } public SmtpFailedRecipientsException(string message) : base(message) { innerExceptions = new SmtpFailedRecipientException[0]; } public SmtpFailedRecipientsException(string message, Exception innerException) : base(message, innerException) { SmtpFailedRecipientException smtpException = innerException as SmtpFailedRecipientException; this.innerExceptions = smtpException == null ? new SmtpFailedRecipientException[0] : new SmtpFailedRecipientException[] { smtpException }; } protected SmtpFailedRecipientsException(SerializationInfo info, StreamingContext context) : base(info, context) { innerExceptions = (SmtpFailedRecipientException[]) info.GetValue("innerExceptions", typeof(SmtpFailedRecipientException[])); } public SmtpFailedRecipientsException(string message, SmtpFailedRecipientException[] innerExceptions) : base(message, innerExceptions != null && innerExceptions.Length > 0 ? innerExceptions[0].FailedRecipient : null, innerExceptions != null && innerExceptions.Length > 0 ? innerExceptions[0] : null) { if (innerExceptions == null) { throw new ArgumentNullException("innerExceptions"); } this.innerExceptions = innerExceptions == null ? new SmtpFailedRecipientException[0] : innerExceptions; } internal SmtpFailedRecipientsException(ArrayList innerExceptions, bool allFailed) : base(allFailed ? SR.GetString(SR.SmtpAllRecipientsFailed) : SR.GetString(SR.SmtpRecipientFailed), innerExceptions != null && innerExceptions.Count > 0 ? ((SmtpFailedRecipientException) innerExceptions[0]).FailedRecipient : null, innerExceptions != null && innerExceptions.Count > 0 ? (SmtpFailedRecipientException) innerExceptions[0] : null) { if (innerExceptions == null) { throw new ArgumentNullException("innerExceptions"); } this.innerExceptions = new SmtpFailedRecipientException[innerExceptions.Count]; int i = 0; foreach(SmtpFailedRecipientException e in innerExceptions) { this.innerExceptions[i++]=e; } } public SmtpFailedRecipientException[] InnerExceptions { get { return innerExceptions; } } // // ISerializable // ///[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { GetObjectData(serializationInfo, streamingContext); } // // FxCop: provide some way for derived classes to access GetObjectData even if the derived class // explicitly re-inherits ISerializable. // [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); serializationInfo.AddValue("innerExceptions", innerExceptions, typeof(SmtpFailedRecipientException[])); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InstanceDataCollection.cs
- AffineTransform3D.cs
- IsolatedStoragePermission.cs
- LinqDataSource.cs
- RbTree.cs
- WebAdminConfigurationHelper.cs
- ScriptServiceAttribute.cs
- SecurityUtils.cs
- MetadataCache.cs
- ConnectionManagementElement.cs
- DataError.cs
- UpdateProgress.cs
- Exceptions.cs
- ProgressBarBrushConverter.cs
- XmlReaderDelegator.cs
- TableLayoutColumnStyleCollection.cs
- ContainerUtilities.cs
- AsymmetricKeyExchangeFormatter.cs
- Formatter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- RightsManagementEncryptedStream.cs
- HttpListenerRequest.cs
- XPathAncestorQuery.cs
- QueryRewriter.cs
- HtmlInputSubmit.cs
- X509ClientCertificateAuthenticationElement.cs
- FormsAuthenticationModule.cs
- Int32CollectionValueSerializer.cs
- BuildResultCache.cs
- KeyInterop.cs
- XpsStructure.cs
- HiddenField.cs
- WindowsListViewScroll.cs
- FixedPosition.cs
- LayoutTable.cs
- ColumnPropertiesGroup.cs
- AttributeProviderAttribute.cs
- ObjectKeyFrameCollection.cs
- ButtonField.cs
- EntityContainer.cs
- FilteredAttributeCollection.cs
- SqlError.cs
- WebScriptEnablingBehavior.cs
- PngBitmapEncoder.cs
- FileNotFoundException.cs
- HandlerBase.cs
- NameValueConfigurationElement.cs
- WindowsGraphicsCacheManager.cs
- AnnotationHighlightLayer.cs
- FileStream.cs
- OwnerDrawPropertyBag.cs
- DefaultPropertyAttribute.cs
- UDPClient.cs
- Trigger.cs
- MailFileEditor.cs
- MultipleViewProviderWrapper.cs
- MetaForeignKeyColumn.cs
- PolyLineSegmentFigureLogic.cs
- AQNBuilder.cs
- ResourceSet.cs
- ContentPlaceHolder.cs
- FlowDocumentView.cs
- StoryFragments.cs
- LineSegment.cs
- AuthenticatedStream.cs
- UTF32Encoding.cs
- MethodBody.cs
- HitTestResult.cs
- ConfigXmlComment.cs
- CommandValueSerializer.cs
- ActivationProxy.cs
- XmlSchemaValidationException.cs
- TextTreeRootNode.cs
- DoubleIndependentAnimationStorage.cs
- DateTimeFormatInfo.cs
- PassportAuthenticationModule.cs
- _RequestCacheProtocol.cs
- SeekableReadStream.cs
- ErrorView.xaml.cs
- FixedLineResult.cs
- __ComObject.cs
- MetadataPropertyAttribute.cs
- cookiecontainer.cs
- AggregateException.cs
- glyphs.cs
- ProgressBar.cs
- CreateUserErrorEventArgs.cs
- DocumentCollection.cs
- NativeCompoundFileAPIs.cs
- ViewBase.cs
- ComplusEndpointConfigContainer.cs
- _FtpDataStream.cs
- SqlDataSourceQueryConverter.cs
- AnnotationMap.cs
- SHA1.cs
- Quaternion.cs
- SqlFileStream.cs
- EmptyCollection.cs
- ISO2022Encoding.cs
- XsltSettings.cs