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
- PathParser.cs
- StrokeNodeEnumerator.cs
- SourceInterpreter.cs
- CurrencyWrapper.cs
- CollectionChangedEventManager.cs
- XmlEncoding.cs
- Configuration.cs
- CellLabel.cs
- UmAlQuraCalendar.cs
- DbExpressionRules.cs
- TimeManager.cs
- CommandPlan.cs
- AxImporter.cs
- WindowsListViewSubItem.cs
- PassportAuthentication.cs
- XmlSchemaExporter.cs
- NonBatchDirectoryCompiler.cs
- DataShape.cs
- ItemMap.cs
- XmlWriterDelegator.cs
- XsltSettings.cs
- PropertyAccessVisitor.cs
- XamlFilter.cs
- BulletedList.cs
- TypefaceMap.cs
- FloaterBaseParaClient.cs
- HtmlAnchor.cs
- ProxyManager.cs
- SqlClientMetaDataCollectionNames.cs
- OperandQuery.cs
- ObjectReferenceStack.cs
- IconBitmapDecoder.cs
- EventLogEntry.cs
- ObjectStateManager.cs
- QilXmlWriter.cs
- MSAANativeProvider.cs
- RemotingAttributes.cs
- ByteKeyFrameCollection.cs
- EntityDataSourceView.cs
- _OSSOCK.cs
- Interlocked.cs
- SpotLight.cs
- InlineUIContainer.cs
- SimpleTextLine.cs
- ToolboxItemFilterAttribute.cs
- ViewRendering.cs
- safePerfProviderHandle.cs
- BCryptSafeHandles.cs
- TdsParserSafeHandles.cs
- GeometryHitTestResult.cs
- TablePattern.cs
- DataServiceQueryOfT.cs
- TransformerInfoCollection.cs
- CqlQuery.cs
- WebPartConnectionsConfigureVerb.cs
- CustomError.cs
- XmlUtil.cs
- InputReportEventArgs.cs
- OutputCacheSettingsSection.cs
- XmlSchemaCompilationSettings.cs
- Pair.cs
- NestedContainer.cs
- WrapPanel.cs
- FormsAuthenticationUserCollection.cs
- WsatServiceCertificate.cs
- SqlDataSourceCommandEventArgs.cs
- assemblycache.cs
- AttributeExtensions.cs
- LicenseContext.cs
- ThemeDirectoryCompiler.cs
- PersonalizationStateQuery.cs
- TextServicesCompartmentEventSink.cs
- TextRunCache.cs
- Simplifier.cs
- DelayedRegex.cs
- MultiDataTrigger.cs
- RectangleGeometry.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ModelTreeEnumerator.cs
- IndexingContentUnit.cs
- PropertyMetadata.cs
- XmlArrayItemAttribute.cs
- ProxyWebPartConnectionCollection.cs
- SizeAnimation.cs
- TreeChangeInfo.cs
- DataGridViewTopRowAccessibleObject.cs
- TreeView.cs
- ScrollEventArgs.cs
- DBConnectionString.cs
- FixedPosition.cs
- MediaContext.cs
- ActivityBuilderHelper.cs
- ToolStripPanel.cs
- GridItemCollection.cs
- ListViewGroupItemCollection.cs
- DoubleLink.cs
- DynamicMetaObjectBinder.cs
- SourceExpressionException.cs
- WindowsGraphics2.cs
- DynamicExpression.cs