Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- IsolatedStoragePermission.cs
- BrushConverter.cs
- SplineKeyFrames.cs
- ZoneLinkButton.cs
- CanonicalXml.cs
- DesignerObject.cs
- SQLSingleStorage.cs
- PropertyMap.cs
- XmlDeclaration.cs
- sqlstateclientmanager.cs
- MissingManifestResourceException.cs
- SimpleWebHandlerParser.cs
- EdmProperty.cs
- InvalidOleVariantTypeException.cs
- EraserBehavior.cs
- externdll.cs
- SessionStateModule.cs
- NotImplementedException.cs
- MasterPageBuildProvider.cs
- PropertyInformationCollection.cs
- FrameworkElementAutomationPeer.cs
- MimePart.cs
- StartUpEventArgs.cs
- VisualTreeHelper.cs
- EnvironmentPermission.cs
- WmlLinkAdapter.cs
- ComPersistableTypeElement.cs
- Helper.cs
- EmptyQuery.cs
- SiteMapHierarchicalDataSourceView.cs
- HttpRawResponse.cs
- CodeRegionDirective.cs
- RijndaelManagedTransform.cs
- XComponentModel.cs
- NumberSubstitution.cs
- CornerRadius.cs
- SqlProcedureAttribute.cs
- StringBlob.cs
- ToolStripContainerDesigner.cs
- CheckBoxPopupAdapter.cs
- XamlClipboardData.cs
- CodeCatchClauseCollection.cs
- DetailsViewUpdatedEventArgs.cs
- DataGridTextBox.cs
- InheritanceAttribute.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- HttpPostedFileBase.cs
- SiteMapNode.cs
- DrawingGroup.cs
- QueryStringParameter.cs
- NullReferenceException.cs
- RecommendedAsConfigurableAttribute.cs
- PeerNodeTraceRecord.cs
- StickyNote.cs
- MouseBinding.cs
- IDQuery.cs
- HostedTcpTransportManager.cs
- RestClientProxyHandler.cs
- MergeFilterQuery.cs
- LocalizationParserHooks.cs
- String.cs
- DisplayInformation.cs
- ScriptingJsonSerializationSection.cs
- DataGridSortCommandEventArgs.cs
- RayHitTestParameters.cs
- BamlBinaryReader.cs
- CompModHelpers.cs
- ClientTargetCollection.cs
- ErrorItem.cs
- InvalidOperationException.cs
- XmlException.cs
- DispatcherHooks.cs
- IndexOutOfRangeException.cs
- OpacityConverter.cs
- RequestCacheEntry.cs
- TextBoxAutoCompleteSourceConverter.cs
- ColumnHeader.cs
- SqlCommandBuilder.cs
- ContainerUtilities.cs
- ScrollProviderWrapper.cs
- SmtpTransport.cs
- DecoderNLS.cs
- HtmlInputPassword.cs
- NumericExpr.cs
- UnconditionalPolicy.cs
- CollectionsUtil.cs
- Configuration.cs
- StandardBindingReliableSessionElement.cs
- BitmapMetadataEnumerator.cs
- DiscoveryService.cs
- JavaScriptSerializer.cs
- IdentityManager.cs
- X509ClientCertificateAuthenticationElement.cs
- Pair.cs
- MatrixTransform3D.cs
- Convert.cs
- Vector3D.cs
- BlurBitmapEffect.cs
- OperationCanceledException.cs
- EntityEntry.cs