Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Mail / SmtpFailedRecipientsException.cs / 1305376 / SmtpFailedRecipientsException.cs
using System; using System.Collections; using System.Diagnostics.CodeAnalysis; 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 // ///[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "System.dll is still using pre-v4 security model and needs this demand")] [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.Diagnostics.CodeAnalysis; 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 // ///[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "System.dll is still using pre-v4 security model and needs this demand")] [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
- ColorMatrix.cs
- TextElementCollection.cs
- DataViewSettingCollection.cs
- DecoratedNameAttribute.cs
- PackWebRequest.cs
- DbConnectionFactory.cs
- IdentityNotMappedException.cs
- WriteFileContext.cs
- SoundPlayerAction.cs
- _NetworkingPerfCounters.cs
- DataContractJsonSerializer.cs
- ACE.cs
- PiiTraceSource.cs
- XmlNotation.cs
- SemanticBasicElement.cs
- BamlBinaryReader.cs
- SQLInt16Storage.cs
- AstNode.cs
- CodeDelegateInvokeExpression.cs
- AdapterUtil.cs
- regiisutil.cs
- SerializeAbsoluteContext.cs
- SamlSecurityTokenAuthenticator.cs
- ToolStripItemDesigner.cs
- FormViewPagerRow.cs
- SafeNativeMethods.cs
- BufferedReadStream.cs
- SourceLocationProvider.cs
- ReliabilityContractAttribute.cs
- LineSegment.cs
- PointKeyFrameCollection.cs
- SafeNativeMethodsCLR.cs
- CodeEventReferenceExpression.cs
- Region.cs
- ToolStripSettings.cs
- xmlsaver.cs
- NamedPermissionSet.cs
- RuntimeHelpers.cs
- NetworkInformationException.cs
- EntityDataSourceView.cs
- ClientData.cs
- UxThemeWrapper.cs
- Volatile.cs
- FieldAccessException.cs
- ThreadInterruptedException.cs
- MergeExecutor.cs
- InputLanguage.cs
- StartFileNameEditor.cs
- DrawingState.cs
- Set.cs
- WebPartExportVerb.cs
- ConsumerConnectionPointCollection.cs
- AsyncCompletedEventArgs.cs
- DataControlFieldCollection.cs
- RowUpdatedEventArgs.cs
- FormsAuthenticationCredentials.cs
- DataBoundControl.cs
- _Connection.cs
- GridLength.cs
- ImageButton.cs
- ObjectDataSourceEventArgs.cs
- AppSecurityManager.cs
- MonikerHelper.cs
- BodyWriter.cs
- DataGridParentRows.cs
- HScrollBar.cs
- StateRuntime.cs
- ObjectDataSourceSelectingEventArgs.cs
- GridEntryCollection.cs
- MarkupCompilePass2.cs
- XmlSchemaGroup.cs
- ZipFileInfoCollection.cs
- AnnotationAdorner.cs
- ManagedFilter.cs
- HttpDebugHandler.cs
- TableAdapterManagerGenerator.cs
- XamlFigureLengthSerializer.cs
- ExpandSegmentCollection.cs
- BackoffTimeoutHelper.cs
- LocatorPart.cs
- ActivityDesignerLayoutSerializers.cs
- ApplicationProxyInternal.cs
- GlobalizationSection.cs
- DecoderFallbackWithFailureFlag.cs
- DocumentOrderComparer.cs
- WebRequest.cs
- SaveFileDialog.cs
- ProviderBase.cs
- BufferModesCollection.cs
- HttpResponseHeader.cs
- BufferModeSettings.cs
- sqlinternaltransaction.cs
- OdbcParameterCollection.cs
- FacetValues.cs
- RecordBuilder.cs
- DbReferenceCollection.cs
- StylusTip.cs
- ChannelDispatcherCollection.cs
- EntitySetBaseCollection.cs
- TreeSet.cs