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
- DataListItemCollection.cs
- HybridWebProxyFinder.cs
- VisualTreeUtils.cs
- ConfigXmlText.cs
- LambdaExpression.cs
- BitArray.cs
- Calendar.cs
- JsonFormatGeneratorStatics.cs
- BinaryUtilClasses.cs
- SecureStringHasher.cs
- ManagementScope.cs
- StatusBarDrawItemEvent.cs
- PackageDigitalSignatureManager.cs
- ChannelPoolSettings.cs
- SimpleFileLog.cs
- MenuItem.cs
- StatusBarPanelClickEvent.cs
- DbDataRecord.cs
- XmlEnumAttribute.cs
- ThicknessKeyFrameCollection.cs
- GradientStopCollection.cs
- ProvideValueServiceProvider.cs
- XmlSchemaAll.cs
- SimpleExpression.cs
- SrgsElementFactory.cs
- DynamicValidatorEventArgs.cs
- KerberosReceiverSecurityToken.cs
- WebRequestModuleElement.cs
- RequestCache.cs
- MediaTimeline.cs
- RijndaelManaged.cs
- SafeFreeMibTable.cs
- securitycriticaldata.cs
- Int32AnimationBase.cs
- DecoderReplacementFallback.cs
- SecurityValidationBehavior.cs
- OleDbStruct.cs
- SiteMapDataSourceView.cs
- SamlAuthorityBinding.cs
- HttpStreamXmlDictionaryWriter.cs
- SMSvcHost.cs
- TraceInternal.cs
- GifBitmapEncoder.cs
- ComplexPropertyEntry.cs
- OneToOneMappingSerializer.cs
- WorkflowServiceInstance.cs
- GroupLabel.cs
- NullRuntimeConfig.cs
- TimeSpanSecondsConverter.cs
- EventSourceCreationData.cs
- PropertyOrder.cs
- TextStore.cs
- TemplateKey.cs
- DataGridViewBand.cs
- ChannelProtectionRequirements.cs
- SplayTreeNode.cs
- RadioButtonBaseAdapter.cs
- DefaultTraceListener.cs
- CryptoApi.cs
- AccessedThroughPropertyAttribute.cs
- QueueProcessor.cs
- DataProviderNameConverter.cs
- SimpleBitVector32.cs
- StringFormat.cs
- NameValuePermission.cs
- securitycriticaldataClass.cs
- securitycriticaldata.cs
- GlyphRunDrawing.cs
- Misc.cs
- BuildManagerHost.cs
- DockingAttribute.cs
- PocoEntityKeyStrategy.cs
- StringConcat.cs
- PrimitiveXmlSerializers.cs
- FontCacheUtil.cs
- DescriptionAttribute.cs
- HtmlTextViewAdapter.cs
- PageOutputQuality.cs
- SqlDataSourceCommandParser.cs
- CorePropertiesFilter.cs
- ResolveRequestResponseAsyncResult.cs
- ComPlusContractBehavior.cs
- ProgressBarBrushConverter.cs
- PathGradientBrush.cs
- XmlMemberMapping.cs
- PageFunction.cs
- ControlBuilder.cs
- IndexerHelper.cs
- BuildProviderCollection.cs
- ContactManager.cs
- WasEndpointConfigContainer.cs
- SymbolType.cs
- PriorityBinding.cs
- EntityDataSourceColumn.cs
- QilStrConcat.cs
- CoreChannel.cs
- FaultDescriptionCollection.cs
- HistoryEventArgs.cs
- CLSCompliantAttribute.cs
- clipboard.cs