Code:
/ DotNET / DotNET / 8.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
- ListViewCommandEventArgs.cs
- TemplatedWizardStep.cs
- CreateUserWizard.cs
- IInstanceContextProvider.cs
- UpdateManifestForBrowserApplication.cs
- WebPartAddingEventArgs.cs
- XmlIterators.cs
- ConfigXmlReader.cs
- OuterGlowBitmapEffect.cs
- RequestBringIntoViewEventArgs.cs
- StorageTypeMapping.cs
- LoginCancelEventArgs.cs
- GeneralTransformGroup.cs
- Application.cs
- GlobalAllocSafeHandle.cs
- UrlPropertyAttribute.cs
- JapaneseCalendar.cs
- sqlmetadatafactory.cs
- BindingGroup.cs
- Stack.cs
- ModelFactory.cs
- PointAnimationBase.cs
- SQLMoneyStorage.cs
- EditingCoordinator.cs
- WindowsScrollBarBits.cs
- EncodingConverter.cs
- CodeDOMProvider.cs
- ToolboxService.cs
- NumberSubstitution.cs
- SymLanguageVendor.cs
- CmsUtils.cs
- XmlSchemaException.cs
- HtmlToClrEventProxy.cs
- MultiSelector.cs
- Logging.cs
- ChangeProcessor.cs
- HostingPreferredMapPath.cs
- FormViewModeEventArgs.cs
- StructuralType.cs
- MatrixTransform3D.cs
- DocumentPage.cs
- ISessionStateStore.cs
- SplitContainer.cs
- RadioButton.cs
- SupportsEventValidationAttribute.cs
- ComponentEditorPage.cs
- FormsAuthenticationTicket.cs
- ResourceExpressionBuilder.cs
- Empty.cs
- WebSysDefaultValueAttribute.cs
- RijndaelManagedTransform.cs
- WaitForChangedResult.cs
- ClientRuntimeConfig.cs
- FontNamesConverter.cs
- XamlToRtfParser.cs
- GeometryModel3D.cs
- IdentityHolder.cs
- EdmTypeAttribute.cs
- CollectionTypeElement.cs
- MetabaseServerConfig.cs
- Identity.cs
- UInt16.cs
- MobileResource.cs
- SettingsPropertyCollection.cs
- DropDownList.cs
- Stylus.cs
- XmlWriter.cs
- RenderData.cs
- SwitchElementsCollection.cs
- ContractReference.cs
- HttpContextWrapper.cs
- PropertyHelper.cs
- ConnectionStringSettings.cs
- SqlClientFactory.cs
- RayMeshGeometry3DHitTestResult.cs
- TextServicesCompartmentContext.cs
- DiagnosticTrace.cs
- LinkLabelLinkClickedEvent.cs
- EntitySqlException.cs
- FacetChecker.cs
- ContextStaticAttribute.cs
- CodeIndexerExpression.cs
- MediaTimeline.cs
- GridViewUpdatedEventArgs.cs
- xmlglyphRunInfo.cs
- PropertyEmitter.cs
- SessionPageStatePersister.cs
- RelationshipNavigation.cs
- LabelLiteral.cs
- SrgsItemList.cs
- ClaimSet.cs
- TextEffectResolver.cs
- StringExpressionSet.cs
- BaseUriHelper.cs
- CLRBindingWorker.cs
- ExtendedProperty.cs
- NameObjectCollectionBase.cs
- LogLogRecordEnumerator.cs
- MatrixAnimationUsingKeyFrames.cs
- CornerRadius.cs