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
- elementinformation.cs
- ExpressionUtilities.cs
- HttpWebResponse.cs
- WindowPatternIdentifiers.cs
- WebBrowsableAttribute.cs
- ValidationEventArgs.cs
- RoutedPropertyChangedEventArgs.cs
- SafeReversePInvokeHandle.cs
- ToolBarOverflowPanel.cs
- DetailsViewInsertEventArgs.cs
- ThreadAttributes.cs
- ConfigXmlReader.cs
- ZoneButton.cs
- SplineQuaternionKeyFrame.cs
- DetailsViewDeletedEventArgs.cs
- AddInProcess.cs
- FileAuthorizationModule.cs
- LineServicesCallbacks.cs
- RootAction.cs
- NegotiateStream.cs
- sqlstateclientmanager.cs
- PackWebRequest.cs
- NetworkInterface.cs
- ELinqQueryState.cs
- FontUnitConverter.cs
- ProcessInfo.cs
- XmlSchemaAttributeGroupRef.cs
- MoveSizeWinEventHandler.cs
- WindowsBrush.cs
- FormsIdentity.cs
- InstalledFontCollection.cs
- LayoutExceptionEventArgs.cs
- SizeAnimationClockResource.cs
- DrawListViewSubItemEventArgs.cs
- ReadWriteSpinLock.cs
- ConfigurationConverterBase.cs
- CodeTypeParameter.cs
- StorageMappingFragment.cs
- OrderedDictionary.cs
- ClientOperation.cs
- RegularExpressionValidator.cs
- WindowsListView.cs
- _HeaderInfo.cs
- ApplicationServicesHostFactory.cs
- RelationshipEndMember.cs
- BaseCAMarshaler.cs
- Semaphore.cs
- SchemaNotation.cs
- InputMethod.cs
- DeadCharTextComposition.cs
- ClientSession.cs
- XMLDiffLoader.cs
- DynamicObject.cs
- TypeTypeConverter.cs
- IEnumerable.cs
- XmlSchemaAnnotated.cs
- SelectionWordBreaker.cs
- SmiContextFactory.cs
- RequiredAttributeAttribute.cs
- BitmapVisualManager.cs
- HwndMouseInputProvider.cs
- ReadOnlyObservableCollection.cs
- LinqDataSource.cs
- WebPartAddingEventArgs.cs
- PrintingPermissionAttribute.cs
- ListenerUnsafeNativeMethods.cs
- Color.cs
- AuthenticatedStream.cs
- PropertyMapper.cs
- InlineObject.cs
- DynamicPropertyReader.cs
- SettingsSection.cs
- SystemParameters.cs
- HttpCachePolicyElement.cs
- ScriptServiceAttribute.cs
- WindowsRichEditRange.cs
- BinaryReader.cs
- ControlValuePropertyAttribute.cs
- VoiceInfo.cs
- UnsafeNativeMethodsPenimc.cs
- FormsAuthenticationUserCollection.cs
- SqlCacheDependencyDatabase.cs
- OperationDescriptionCollection.cs
- LinqDataSourceDeleteEventArgs.cs
- EdmType.cs
- ArcSegment.cs
- QilInvokeLateBound.cs
- PhysicalOps.cs
- CodeEntryPointMethod.cs
- EtwTrace.cs
- exports.cs
- EmptyStringExpandableObjectConverter.cs
- UnionCodeGroup.cs
- CheckedPointers.cs
- BaseCodePageEncoding.cs
- GeneralTransformGroup.cs
- SamlAdvice.cs
- X509Extension.cs
- XmlSchemaComplexContentRestriction.cs
- Label.cs