Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- IsolatedStorageFilePermission.cs
- CompilationSection.cs
- Substitution.cs
- NonSerializedAttribute.cs
- XPathNodeHelper.cs
- HtmlEmptyTagControlBuilder.cs
- PartialCachingControl.cs
- SizeKeyFrameCollection.cs
- DoubleAnimationUsingPath.cs
- LinqTreeNodeEvaluator.cs
- LayoutManager.cs
- UserNameSecurityTokenAuthenticator.cs
- VirtualPathProvider.cs
- XamlFrame.cs
- ZipIOLocalFileDataDescriptor.cs
- WindowsRegion.cs
- UnsafeNativeMethods.cs
- XmlSchemaSequence.cs
- KeyToListMap.cs
- ThicknessAnimationBase.cs
- DataGridViewButtonCell.cs
- SafeHandles.cs
- QueryResponse.cs
- DrawingContextDrawingContextWalker.cs
- DesignerForm.cs
- SqlInternalConnectionTds.cs
- TransformValueSerializer.cs
- Automation.cs
- TextTreeObjectNode.cs
- DocumentOrderQuery.cs
- PtsPage.cs
- ObjectReferenceStack.cs
- PasswordPropertyTextAttribute.cs
- ObjRef.cs
- ControlBuilder.cs
- AesCryptoServiceProvider.cs
- GiveFeedbackEventArgs.cs
- UserUseLicenseDictionaryLoader.cs
- ListViewItemSelectionChangedEvent.cs
- Window.cs
- PointF.cs
- ToolStripComboBox.cs
- PrimaryKeyTypeConverter.cs
- TreeViewEvent.cs
- CheckBoxBaseAdapter.cs
- DecoderReplacementFallback.cs
- Int32Rect.cs
- Parsers.cs
- KeyToListMap.cs
- InfoCardClaimCollection.cs
- MediaSystem.cs
- XNodeValidator.cs
- PipelineModuleStepContainer.cs
- BoundConstants.cs
- NameTable.cs
- XPathNodeInfoAtom.cs
- XslTransform.cs
- CaseStatementProjectedSlot.cs
- StylusCollection.cs
- _ProxyRegBlob.cs
- Predicate.cs
- URLIdentityPermission.cs
- OleDbError.cs
- MediaScriptCommandRoutedEventArgs.cs
- Latin1Encoding.cs
- RichTextBoxConstants.cs
- Soap12ServerProtocol.cs
- DataColumnMappingCollection.cs
- TemplateBuilder.cs
- CompilationRelaxations.cs
- CmsInterop.cs
- BoundsDrawingContextWalker.cs
- InfoCardMetadataExchangeClient.cs
- ComponentSerializationService.cs
- DataGridParentRows.cs
- GridViewSelectEventArgs.cs
- IsolationInterop.cs
- ConstructorNeedsTagAttribute.cs
- WsatConfiguration.cs
- XmlILModule.cs
- WebPartConnectVerb.cs
- AssemblyResourceLoader.cs
- FlowDocumentReaderAutomationPeer.cs
- DataGridColumnEventArgs.cs
- XmlHelper.cs
- DataGridViewAdvancedBorderStyle.cs
- Model3D.cs
- WebPartUtil.cs
- Oci.cs
- Brush.cs
- EntityDataSourceQueryBuilder.cs
- StandardOleMarshalObject.cs
- DataGridViewLayoutData.cs
- NameValuePair.cs
- Condition.cs
- DataObjectAttribute.cs
- ViewgenGatekeeper.cs
- COM2TypeInfoProcessor.cs
- ExclusiveCanonicalizationTransform.cs
- PeerApplication.cs