Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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[])); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ValueProviderWrapper.cs
- CodeAttachEventStatement.cs
- MailAddress.cs
- ActivationServices.cs
- WorkerRequest.cs
- DataGridViewCellLinkedList.cs
- StrongNamePublicKeyBlob.cs
- SplitterCancelEvent.cs
- SafeUserTokenHandle.cs
- EncoderBestFitFallback.cs
- MethodRental.cs
- XmlSchemaDatatype.cs
- ScrollChrome.cs
- UInt16Storage.cs
- TypographyProperties.cs
- QueryCursorEventArgs.cs
- ContentPlaceHolder.cs
- EntryIndex.cs
- ConditionalBranch.cs
- UserInitiatedNavigationPermission.cs
- DbConnectionPoolIdentity.cs
- MemoryStream.cs
- WriteLineDesigner.xaml.cs
- CodeIdentifier.cs
- EdmComplexPropertyAttribute.cs
- SimpleTypeResolver.cs
- ColorAnimationUsingKeyFrames.cs
- ViewBox.cs
- LinkedResourceCollection.cs
- DesignerUtility.cs
- DesignerUtils.cs
- CheckBox.cs
- CompiledAction.cs
- DecimalAnimationBase.cs
- AppDomainManager.cs
- SecondaryIndexDefinition.cs
- log.cs
- _ListenerAsyncResult.cs
- UpdateRecord.cs
- NameValueSectionHandler.cs
- SyncOperationState.cs
- RequiredAttributeAttribute.cs
- Base64Encoder.cs
- RotateTransform.cs
- DEREncoding.cs
- IgnoreFlushAndCloseStream.cs
- SafeEventLogWriteHandle.cs
- DbModificationClause.cs
- BooleanFunctions.cs
- SpellCheck.cs
- CellQuery.cs
- HandlerFactoryWrapper.cs
- BooleanFunctions.cs
- RoleManagerEventArgs.cs
- SiteMapNodeItem.cs
- DbProviderFactoriesConfigurationHandler.cs
- xsdvalidator.cs
- BinaryCommonClasses.cs
- VisualBrush.cs
- DataBoundControl.cs
- ExpandoClass.cs
- WS2007FederationHttpBindingCollectionElement.cs
- IdnMapping.cs
- PointAnimation.cs
- XmlNamedNodeMap.cs
- XmlChildNodes.cs
- TaskFormBase.cs
- TextParagraphCache.cs
- VirtualDirectoryMappingCollection.cs
- NumberSubstitution.cs
- SpeechEvent.cs
- MimeParameterWriter.cs
- CheckBox.cs
- DataObject.cs
- ComponentChangingEvent.cs
- ClockGroup.cs
- MenuItem.cs
- WebConfigurationHostFileChange.cs
- ObjectContext.cs
- FolderNameEditor.cs
- FixedPosition.cs
- MessageQueueEnumerator.cs
- Win32.cs
- IsolatedStorageFilePermission.cs
- KeySpline.cs
- TreeNodeCollection.cs
- SchemaAttDef.cs
- ExpandableObjectConverter.cs
- DataGridItemCollection.cs
- XmlException.cs
- ItemCollection.cs
- TemplateEditingVerb.cs
- TransformCollection.cs
- UpdateExpressionVisitor.cs
- TextEmbeddedObject.cs
- TextEditorDragDrop.cs
- SecurityTokenSerializer.cs
- LinearGradientBrush.cs
- CachingHintValidation.cs
- Application.cs