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
- GenericWebPart.cs
- SetterTriggerConditionValueConverter.cs
- CssStyleCollection.cs
- TransportContext.cs
- SourceElementsCollection.cs
- SingleKeyFrameCollection.cs
- ExecutionEngineException.cs
- DBSqlParserColumn.cs
- PersonalizablePropertyEntry.cs
- EdmFunction.cs
- TreeNodeMouseHoverEvent.cs
- XmlSerializerFactory.cs
- safemediahandle.cs
- XmlHierarchicalEnumerable.cs
- GiveFeedbackEventArgs.cs
- SoapSchemaImporter.cs
- MaterializeFromAtom.cs
- _RequestCacheProtocol.cs
- DataGridTablesFactory.cs
- SamlAuthorizationDecisionClaimResource.cs
- HttpCookie.cs
- _SSPISessionCache.cs
- mediaclock.cs
- DynamicActivityTypeDescriptor.cs
- AttributeTableBuilder.cs
- NameObjectCollectionBase.cs
- SoapSchemaMember.cs
- BezierSegment.cs
- DaylightTime.cs
- SafeCryptContextHandle.cs
- LongPath.cs
- MetabaseServerConfig.cs
- InternalConfigConfigurationFactory.cs
- InternalConfirm.cs
- EventLogInternal.cs
- PersistenceContext.cs
- Part.cs
- SectionXmlInfo.cs
- DocumentViewerBaseAutomationPeer.cs
- DataObject.cs
- ToolStripManager.cs
- HttpWriter.cs
- MappingModelBuildProvider.cs
- CollectionsUtil.cs
- ContextInformation.cs
- BitmapInitialize.cs
- SelectQueryOperator.cs
- Point4D.cs
- GlobalizationSection.cs
- SineEase.cs
- CaretElement.cs
- ProxyGenerator.cs
- TaskbarItemInfo.cs
- XsdDataContractExporter.cs
- GridViewDeleteEventArgs.cs
- MapPathBasedVirtualPathProvider.cs
- Geometry.cs
- StateChangeEvent.cs
- LambdaCompiler.Address.cs
- WebPartAddingEventArgs.cs
- SpellerError.cs
- ProjectionPlanCompiler.cs
- MsmqIntegrationBinding.cs
- safesecurityhelperavalon.cs
- DiagnosticTraceSource.cs
- HtmlInputButton.cs
- EntityContainerRelationshipSetEnd.cs
- SqlEnums.cs
- ExpressionBuilder.cs
- OleDbCommand.cs
- TCPListener.cs
- ContextStack.cs
- XmlStreamStore.cs
- TcpProcessProtocolHandler.cs
- SecurityTokenProviderContainer.cs
- SymbolEqualComparer.cs
- ContentHostHelper.cs
- RequestCacheEntry.cs
- ActiveDocumentEvent.cs
- Input.cs
- RootBuilder.cs
- SessionPageStatePersister.cs
- WebConfigurationFileMap.cs
- UpdateTracker.cs
- DbException.cs
- DataErrorValidationRule.cs
- PropertyGridView.cs
- EndpointDiscoveryMetadata11.cs
- DiscoveryInnerClientManaged11.cs
- Publisher.cs
- TextTreePropertyUndoUnit.cs
- RadioButtonStandardAdapter.cs
- Point3DConverter.cs
- XXXOnTypeBuilderInstantiation.cs
- SplineKeyFrames.cs
- AsymmetricSignatureFormatter.cs
- _DisconnectOverlappedAsyncResult.cs
- XmlEventCache.cs
- VisualCollection.cs
- ImageListUtils.cs