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
- VersionedStreamOwner.cs
- RightsManagementEncryptedStream.cs
- RelationshipSet.cs
- DecoderReplacementFallback.cs
- SqlUDTStorage.cs
- TextTrailingCharacterEllipsis.cs
- ManipulationCompletedEventArgs.cs
- PropVariant.cs
- ProcessModuleCollection.cs
- DefaultMemberAttribute.cs
- UIPermission.cs
- FacetValueContainer.cs
- ResourcePart.cs
- RelationshipWrapper.cs
- mactripleDES.cs
- Window.cs
- Separator.cs
- ReachDocumentPageSerializerAsync.cs
- CodeBlockBuilder.cs
- AnnotationService.cs
- DecoderFallbackWithFailureFlag.cs
- MultiView.cs
- AppearanceEditorPart.cs
- PositiveTimeSpanValidator.cs
- Win32.cs
- QueryableFilterRepeater.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- XPathParser.cs
- HtmlTextArea.cs
- IItemProperties.cs
- PointConverter.cs
- XPathScanner.cs
- WmlObjectListAdapter.cs
- XmlBindingWorker.cs
- HttpModuleAction.cs
- PageAdapter.cs
- DocumentReference.cs
- CreateSequenceResponse.cs
- EpmCustomContentWriterNodeData.cs
- PhoneCall.cs
- _Events.cs
- WindowsButton.cs
- BitmapEffectState.cs
- MetaModel.cs
- Timer.cs
- AdRotator.cs
- PeerName.cs
- SmiConnection.cs
- EntityDataSourceView.cs
- XmlLoader.cs
- EntityDataSourceValidationException.cs
- XmlSchemaNotation.cs
- SessionPageStateSection.cs
- PageSettings.cs
- BinaryObjectInfo.cs
- FrameworkContentElementAutomationPeer.cs
- CodeMethodMap.cs
- Type.cs
- HtmlInputPassword.cs
- RadioButtonList.cs
- GraphicsPathIterator.cs
- WsatServiceCertificate.cs
- RegexCompilationInfo.cs
- TextTreeObjectNode.cs
- MimeWriter.cs
- DataBindingCollection.cs
- AppDomainProtocolHandler.cs
- XmlSchemaException.cs
- IntSecurity.cs
- SqlTypeConverter.cs
- WhitespaceSignificantCollectionAttribute.cs
- SafeMILHandleMemoryPressure.cs
- StrongName.cs
- ConnectionProviderAttribute.cs
- ObjectDataSource.cs
- SessionStateItemCollection.cs
- ToolboxItemCollection.cs
- Win32SafeHandles.cs
- Single.cs
- HttpRuntimeSection.cs
- PrivacyNoticeElement.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- Events.cs
- ListDictionaryInternal.cs
- DispatchWrapper.cs
- compensatingcollection.cs
- FontUnitConverter.cs
- AttachInfo.cs
- Utils.cs
- SapiInterop.cs
- FixedNode.cs
- MethodCallConverter.cs
- XamlSerializerUtil.cs
- Grant.cs
- PerformanceCounterPermission.cs
- ResourceAssociationSetEnd.cs
- HelloOperationAsyncResult.cs
- MeasureData.cs
- ListSortDescription.cs
- XmlEntity.cs