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
- DesignerSerializationOptionsAttribute.cs
- OdbcException.cs
- ZoomPercentageConverter.cs
- HwndSourceKeyboardInputSite.cs
- nulltextnavigator.cs
- InvokeWebService.cs
- AssemblySettingAttributes.cs
- RectAnimationClockResource.cs
- CardSpaceException.cs
- SQLCharsStorage.cs
- WindowPattern.cs
- SafeThemeHandle.cs
- VirtualDirectoryMapping.cs
- MenuCommand.cs
- WebConfigurationFileMap.cs
- UriTemplate.cs
- CultureSpecificStringDictionary.cs
- AsynchronousChannelMergeEnumerator.cs
- WebPartConnection.cs
- SecurityException.cs
- SecurityCredentialsManager.cs
- FormViewDeleteEventArgs.cs
- EpmTargetTree.cs
- PasswordBox.cs
- BufferAllocator.cs
- CodeFieldReferenceExpression.cs
- FreezableDefaultValueFactory.cs
- SqlCommand.cs
- SqlDependencyUtils.cs
- GlyphInfoList.cs
- Assert.cs
- FileLogRecord.cs
- NetSectionGroup.cs
- PropertyTabChangedEvent.cs
- TreeView.cs
- UrlMappingCollection.cs
- BmpBitmapEncoder.cs
- ITextView.cs
- StrongNameMembershipCondition.cs
- NumberSubstitution.cs
- SerializableTypeCodeDomSerializer.cs
- httpstaticobjectscollection.cs
- Preprocessor.cs
- MimeWriter.cs
- Compiler.cs
- XamlInt32CollectionSerializer.cs
- HelloOperationCD1AsyncResult.cs
- ObjRef.cs
- XmlWrappingWriter.cs
- Input.cs
- ByteStream.cs
- FormsAuthenticationUser.cs
- SqlDataSourceSelectingEventArgs.cs
- ECDiffieHellmanPublicKey.cs
- TableItemStyle.cs
- BamlRecordWriter.cs
- OutKeywords.cs
- CookieParameter.cs
- TabItemAutomationPeer.cs
- WinFormsUtils.cs
- JsonServiceDocumentSerializer.cs
- ExpressionNormalizer.cs
- Pkcs9Attribute.cs
- CharKeyFrameCollection.cs
- SQLMembershipProvider.cs
- RtfToXamlLexer.cs
- CellParagraph.cs
- PropertyItem.cs
- SqlTypeSystemProvider.cs
- ParameterCollectionEditorForm.cs
- StrokeIntersection.cs
- newinstructionaction.cs
- HtmlEmptyTagControlBuilder.cs
- SiteOfOriginPart.cs
- ScriptManagerProxy.cs
- DataSourceComponent.cs
- GlyphRunDrawing.cs
- ResourceExpressionBuilder.cs
- SpecularMaterial.cs
- DataGridViewRowPostPaintEventArgs.cs
- FrameworkContentElementAutomationPeer.cs
- ProjectionPlanCompiler.cs
- TextEditorThreadLocalStore.cs
- VisualBrush.cs
- ImageList.cs
- EventHandlerService.cs
- XsltLibrary.cs
- SQLStringStorage.cs
- InitializerFacet.cs
- AssemblyHash.cs
- ZipIORawDataFileBlock.cs
- Int32KeyFrameCollection.cs
- SystemEvents.cs
- ImageListDesigner.cs
- DataShape.cs
- ByteConverter.cs
- LabelAutomationPeer.cs
- ProxyHelper.cs
- SchemaLookupTable.cs
- PasswordDeriveBytes.cs