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
- HtmlInputCheckBox.cs
- WebBrowserNavigatedEventHandler.cs
- _KerberosClient.cs
- LinearGradientBrush.cs
- RowToFieldTransformer.cs
- DbParameterHelper.cs
- TabPanel.cs
- DetailsViewInsertedEventArgs.cs
- GeometryHitTestResult.cs
- SByte.cs
- WebConfigManager.cs
- ScrollItemPatternIdentifiers.cs
- GridPattern.cs
- isolationinterop.cs
- TextMarkerSource.cs
- KernelTypeValidation.cs
- BufferedOutputStream.cs
- ColumnWidthChangedEvent.cs
- OutputScopeManager.cs
- DataListItemEventArgs.cs
- KnownIds.cs
- ElementMarkupObject.cs
- CalendarSelectionChangedEventArgs.cs
- DrawingCollection.cs
- RenameRuleObjectDialog.Designer.cs
- BaseUriHelper.cs
- ColumnHeaderConverter.cs
- WebPartDisplayModeCancelEventArgs.cs
- ApplicationSecurityInfo.cs
- CodeBlockBuilder.cs
- SqlCachedBuffer.cs
- securitycriticaldata.cs
- PrinterUnitConvert.cs
- Version.cs
- MULTI_QI.cs
- FlowLayoutPanel.cs
- EntityContainerEntitySet.cs
- ObjectSecurity.cs
- GroupBox.cs
- HttpConfigurationSystem.cs
- ResourcesBuildProvider.cs
- QilParameter.cs
- columnmapfactory.cs
- MonitorWrapper.cs
- UnionCodeGroup.cs
- Rect3D.cs
- OpCodes.cs
- FrugalList.cs
- MetadataItem_Static.cs
- HtmlGenericControl.cs
- TypeNameConverter.cs
- PropertyMetadata.cs
- XmlnsCompatibleWithAttribute.cs
- BatchStream.cs
- ProviderConnectionPoint.cs
- XmlAtomicValue.cs
- RemotingHelper.cs
- ObjectReaderCompiler.cs
- StatusBarPanel.cs
- ClientBuildManager.cs
- CommandSet.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ProxyHwnd.cs
- Verify.cs
- Roles.cs
- SiblingIterators.cs
- Message.cs
- CharacterBufferReference.cs
- ContractListAdapter.cs
- SafeArchiveContext.cs
- PasswordRecovery.cs
- StorageRoot.cs
- DesignerForm.cs
- BindToObject.cs
- COM2AboutBoxPropertyDescriptor.cs
- RangeValidator.cs
- DeclarativeCatalogPart.cs
- ScriptModule.cs
- VectorCollection.cs
- CompilerGeneratedAttribute.cs
- ObjectHandle.cs
- RealProxy.cs
- ResourceReader.cs
- PropertyPathConverter.cs
- BCLDebug.cs
- ToolStripDropDownClosingEventArgs.cs
- ProtocolElement.cs
- OneToOneMappingSerializer.cs
- XmlSchemaSimpleTypeRestriction.cs
- ValidationError.cs
- AssemblyNameProxy.cs
- HostingEnvironment.cs
- COM2ExtendedUITypeEditor.cs
- PrintController.cs
- OperationContextScope.cs
- VerbConverter.cs
- SendKeys.cs
- AudioStateChangedEventArgs.cs
- KeyValuePair.cs
- TypeUtils.cs