Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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[])); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. 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[])); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PageCanvasSize.cs
- URLIdentityPermission.cs
- BatchServiceHost.cs
- ClipboardProcessor.cs
- InvokePatternIdentifiers.cs
- CombinedGeometry.cs
- XXXOnTypeBuilderInstantiation.cs
- HttpStreamXmlDictionaryWriter.cs
- DetailsViewRowCollection.cs
- DataGridRow.cs
- ClonableStack.cs
- HorizontalAlignConverter.cs
- webproxy.cs
- SoapSchemaMember.cs
- RawMouseInputReport.cs
- ColumnMapProcessor.cs
- FontStretch.cs
- CharacterMetricsDictionary.cs
- PreviewPageInfo.cs
- TextStore.cs
- XMLDiffLoader.cs
- ScriptingJsonSerializationSection.cs
- DataError.cs
- TextTrailingCharacterEllipsis.cs
- SQLInt32.cs
- XPathItem.cs
- RepeaterCommandEventArgs.cs
- ConfigurationSchemaErrors.cs
- NameSpaceEvent.cs
- UnknownBitmapEncoder.cs
- ToolStrip.cs
- InheritanceAttribute.cs
- OracleRowUpdatedEventArgs.cs
- RootAction.cs
- DataProviderNameConverter.cs
- FactoryId.cs
- StylusTip.cs
- HttpFileCollection.cs
- Html32TextWriter.cs
- PrincipalPermission.cs
- TextRenderer.cs
- LinqDataSourceInsertEventArgs.cs
- KeyTimeConverter.cs
- ModelFunctionTypeElement.cs
- SafeTimerHandle.cs
- ConfigsHelper.cs
- ImpersonateTokenRef.cs
- UnescapedXmlDiagnosticData.cs
- TdsRecordBufferSetter.cs
- SizeF.cs
- ToolStripLabel.cs
- JoinTreeNode.cs
- BackgroundWorker.cs
- PinnedBufferMemoryStream.cs
- ThaiBuddhistCalendar.cs
- XPathParser.cs
- SpecularMaterial.cs
- TypeToken.cs
- CompilerLocalReference.cs
- TypeLibConverter.cs
- listitem.cs
- XmlSchemaAttribute.cs
- MonikerHelper.cs
- ExpressionBindingCollection.cs
- RequestCacheEntry.cs
- SByteConverter.cs
- PrincipalPermission.cs
- ToolStripItemImageRenderEventArgs.cs
- Header.cs
- CultureInfoConverter.cs
- BitmapEffect.cs
- ResourceDefaultValueAttribute.cs
- ResXBuildProvider.cs
- bindurihelper.cs
- BoundingRectTracker.cs
- PropertyCollection.cs
- BitmapMetadataBlob.cs
- nulltextcontainer.cs
- RepeaterItem.cs
- MemberMaps.cs
- StandardOleMarshalObject.cs
- SQLRoleProvider.cs
- DocumentViewerHelper.cs
- Helper.cs
- Directory.cs
- ColumnReorderedEventArgs.cs
- ConversionContext.cs
- SystemWebCachingSectionGroup.cs
- MulticastOption.cs
- XmlMembersMapping.cs
- Rotation3DKeyFrameCollection.cs
- WebFormsRootDesigner.cs
- HtmlHistory.cs
- lengthconverter.cs
- XmlSchemaSimpleContentRestriction.cs
- FtpRequestCacheValidator.cs
- ListBindingHelper.cs
- securitycriticaldataformultiplegetandset.cs
- MethodExpr.cs
- UriParserTemplates.cs