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
- Keywords.cs
- CmsUtils.cs
- FixedSOMTableCell.cs
- SmiGettersStream.cs
- JsonByteArrayDataContract.cs
- ItemDragEvent.cs
- StringOutput.cs
- DeclarativeCatalogPartDesigner.cs
- IPEndPointCollection.cs
- AdapterSwitches.cs
- Brush.cs
- StringCollection.cs
- SapiRecoInterop.cs
- SR.cs
- DeviceContexts.cs
- RequestCacheValidator.cs
- XmlMemberMapping.cs
- KeyConstraint.cs
- SecurityProtocolFactory.cs
- HttpRequestTraceRecord.cs
- InternalException.cs
- DefaultEvaluationContext.cs
- GeneralTransformGroup.cs
- ScriptResourceDefinition.cs
- mediapermission.cs
- CultureInfoConverter.cs
- PropertyContainer.cs
- ReadWriteControlDesigner.cs
- X509RawDataKeyIdentifierClause.cs
- TypeConstant.cs
- SqlIdentifier.cs
- ItemDragEvent.cs
- AliasExpr.cs
- ParallelEnumerable.cs
- CacheSection.cs
- AccessControlList.cs
- ToolStrip.cs
- RoutedEventValueSerializer.cs
- CellPartitioner.cs
- FixedTextView.cs
- ExpressionConverter.cs
- DataSourceComponent.cs
- FixedTextContainer.cs
- HttpListenerResponse.cs
- WebPartsPersonalization.cs
- WebConfigurationHostFileChange.cs
- MatrixIndependentAnimationStorage.cs
- ScriptReferenceEventArgs.cs
- LineMetrics.cs
- SymmetricCryptoHandle.cs
- XPathMessageFilterElementCollection.cs
- TreeViewDataItemAutomationPeer.cs
- MinimizableAttributeTypeConverter.cs
- X509IssuerSerialKeyIdentifierClause.cs
- Mappings.cs
- ValueType.cs
- HighlightComponent.cs
- XmlLanguageConverter.cs
- ListViewItem.cs
- ControlCachePolicy.cs
- RenderData.cs
- WsdlBuildProvider.cs
- ClientScriptItemCollection.cs
- SymmetricAlgorithm.cs
- Int32EqualityComparer.cs
- EventHandlerList.cs
- ThemeInfoAttribute.cs
- GridViewItemAutomationPeer.cs
- RightNameExpirationInfoPair.cs
- ByteAnimationUsingKeyFrames.cs
- NamespaceCollection.cs
- Hash.cs
- coordinatorscratchpad.cs
- KeyGestureConverter.cs
- DataServiceRequestOfT.cs
- AccessText.cs
- DynamicObjectAccessor.cs
- ColorMap.cs
- Propagator.Evaluator.cs
- DirectoryObjectSecurity.cs
- DefaultHttpHandler.cs
- ColorBlend.cs
- Random.cs
- MailAddressCollection.cs
- precedingquery.cs
- CodeTypeParameterCollection.cs
- DynamicRendererThreadManager.cs
- AtomMaterializer.cs
- ExceptionUtility.cs
- PointConverter.cs
- NavigationProperty.cs
- SmiXetterAccessMap.cs
- RSACryptoServiceProvider.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DispatcherExceptionFilterEventArgs.cs
- unsafenativemethodstextservices.cs
- WebPartUtil.cs
- RoutedEventHandlerInfo.cs
- KeyValueInternalCollection.cs
- MultiBinding.cs