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
- IxmlLineInfo.cs
- WmiPutTraceRecord.cs
- ProgressBarBrushConverter.cs
- BaseResourcesBuildProvider.cs
- DockAndAnchorLayout.cs
- ControlBuilder.cs
- figurelengthconverter.cs
- NamedPipeProcessProtocolHandler.cs
- TextBox.cs
- ObjectCacheHost.cs
- FailedToStartupUIException.cs
- CompositeScriptReferenceEventArgs.cs
- TypeDependencyAttribute.cs
- BinaryConverter.cs
- ListQueryResults.cs
- BamlBinaryWriter.cs
- WindowVisualStateTracker.cs
- ProviderConnectionPoint.cs
- basecomparevalidator.cs
- documentation.cs
- Crypto.cs
- Latin1Encoding.cs
- ListItemCollection.cs
- RemoteWebConfigurationHostStream.cs
- HtmlImage.cs
- Attributes.cs
- KeyPressEvent.cs
- Focus.cs
- ReadOnlyDataSourceView.cs
- EncoderBestFitFallback.cs
- Underline.cs
- SafeSecurityHelper.cs
- GenericAuthenticationEventArgs.cs
- SynchronizationContext.cs
- SudsWriter.cs
- IPPacketInformation.cs
- EntityDataReader.cs
- TrackingStringDictionary.cs
- CapabilitiesAssignment.cs
- QuaternionValueSerializer.cs
- SerializationEventsCache.cs
- LayoutTableCell.cs
- RightsManagementPermission.cs
- SecureStringHasher.cs
- VarInfo.cs
- InstanceDataCollection.cs
- _Events.cs
- GetPageNumberCompletedEventArgs.cs
- QilPatternFactory.cs
- KoreanLunisolarCalendar.cs
- VBCodeProvider.cs
- WebPartEditorOkVerb.cs
- LoopExpression.cs
- XmlnsDefinitionAttribute.cs
- Literal.cs
- TableLayoutPanelResizeGlyph.cs
- NonceCache.cs
- ResizeGrip.cs
- AdRotator.cs
- ClientSideQueueItem.cs
- TreeViewImageIndexConverter.cs
- IdentityNotMappedException.cs
- MatrixTransform.cs
- PathData.cs
- Operator.cs
- HtmlTableCellCollection.cs
- MediaCommands.cs
- Currency.cs
- FormsAuthenticationConfiguration.cs
- Decorator.cs
- DbProviderSpecificTypePropertyAttribute.cs
- MarshalByRefObject.cs
- SecurityManager.cs
- ConvertBinder.cs
- NativeMethods.cs
- CodeDomSerializer.cs
- AttachedAnnotation.cs
- SelectionPattern.cs
- WindowsStatic.cs
- ProcessModelSection.cs
- TripleDESCryptoServiceProvider.cs
- MetaChildrenColumn.cs
- SingleBodyParameterMessageFormatter.cs
- ValueTable.cs
- ToolStripManager.cs
- DocumentXPathNavigator.cs
- SafeNativeMethodsMilCoreApi.cs
- XamlSerializationHelper.cs
- XmlDigitalSignatureProcessor.cs
- CompressionTransform.cs
- DynamicMethod.cs
- ECDiffieHellmanCngPublicKey.cs
- XmlReturnWriter.cs
- Atom10FormatterFactory.cs
- TextServicesProperty.cs
- TextElementCollectionHelper.cs
- AttributeQuery.cs
- ObjectIDGenerator.cs
- FormatConvertedBitmap.cs
- WebPartsSection.cs