mscorlib(4.0.0.0) API with additions
System.AggregateException Class Reference

Represents one or more errors that occur during application execution. More...

Inheritance diagram for System.AggregateException:
[legend]
Collaboration diagram for System.AggregateException:
[legend]

Public Member Functions

 AggregateException ()
 Initializes a new instance of the T:System.AggregateException class with a system-supplied message that describes the error. More...
 
 AggregateException (string message)
 Initializes a new instance of the T:System.AggregateException class with a specified message that describes the error. More...
 
 AggregateException (string message, Exception innerException)
 Initializes a new instance of the T:System.AggregateException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
 AggregateException (IEnumerable< Exception > innerExceptions)
 Initializes a new instance of the T:System.AggregateException class with references to the inner exceptions that are the cause of this exception. More...
 
 AggregateException (params Exception[] innerExceptions)
 Initializes a new instance of the T:System.AggregateException class with references to the inner exceptions that are the cause of this exception. More...
 
 AggregateException??? (string message, IEnumerable< Exception > innerExceptions)
 Initializes a new instance of the T:System.AggregateException class with a specified error message and references to the inner exceptions that are the cause of this exception. More...
 
 AggregateException (string message, params Exception[] innerExceptions)
 Initializes a new instance of the T:System.AggregateException class with a specified error message and references to the inner exceptions that are the cause of this exception. More...
 
override void GetObjectData (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.AggregateException class with serialized data. More...
 
override Exception GetBaseException ()
 Returns the T:System.AggregateException that is the root cause of this exception. More...
 
void Handle (Func< Exception, bool > predicate)
 Invokes a handler on each T:System.Exception contained by this T:System.AggregateException. More...
 
AggregateException Flatten ()
 Flattens an T:System.AggregateException instances into a single, new instance. More...
 
override string ToString ()
 Creates and returns a string representation of the current T:System.AggregateException. More...
 
- Public Member Functions inherited from System.Exception
 Exception ()
 Initializes a new instance of the T:System.Exception class. More...
 
 Exception (string message)
 Initializes a new instance of the T:System.Exception class with a specified error message. More...
 
 Exception (string message, Exception innerException)
 Initializes a new instance of the T:System.Exception class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
override string ToString ()
 Creates and returns a string representation of the current exception. More...
 
new Type GetType ()
 Gets the runtime type of the current instance. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._Exception
new bool Equals (object obj)
 Provides COM objects with version-independent access to the M:System.Object.Equals(System.Object) method. More...
 
new int GetHashCode ()
 Provides COM objects with version-independent access to the M:System.Object.GetHashCode method. More...
 

Protected Member Functions

 AggregateException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.AggregateException class with serialized data. More...
 
- Protected Member Functions inherited from System.Exception
 Exception (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.Exception class with serialized data. More...
 

Properties

ReadOnlyCollection< ExceptionInnerExceptions [get]
 Gets a read-only collection of the T:System.Exception instances that caused the current exception. More...
 
- Properties inherited from System.Exception
virtual string Message [get]
 Gets a message that describes the current exception. More...
 
virtual IDictionary Data [get]
 Gets a collection of key/value pairs that provide additional user-defined information about the exception. More...
 
Exception InnerException [get]
 Gets the T:System.Exception instance that caused the current exception. More...
 
MethodBase TargetSite [get]
 Gets the method that throws the current exception. More...
 
virtual string StackTrace [get]
 Gets a string representation of the immediate frames on the call stack. More...
 
virtual string HelpLink [get, set]
 Gets or sets a link to the help file associated with this exception. More...
 
virtual string Source [get, set]
 Gets or sets the name of the application or the object that causes the error. More...
 
int HResult [get, protected set]
 Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. More...
 
EventHandler< SafeSerializationEventArgsSerializeObjectState
 Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. More...
 
- Properties inherited from System.Runtime.InteropServices._Exception
string Message [get]
 Provides COM objects with version-independent access to the P:System.Exception.Message property. More...
 
string StackTrace [get]
 Provides COM objects with version-independent access to the P:System.Exception.StackTrace property. More...
 
string HelpLink [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.HelpLink property. More...
 
string Source [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.Source property. More...
 
Exception InnerException [get]
 Provides COM objects with version-independent access to the P:System.Exception.InnerException property. More...
 
MethodBase TargetSite [get]
 Provides COM objects with version-independent access to the P:System.Exception.TargetSite property. More...
 

Detailed Description

Represents one or more errors that occur during application execution.

Definition at line 15 of file AggregateException.cs.

Constructor & Destructor Documentation

◆ AggregateException() [1/7]

System.AggregateException.AggregateException ( )

Initializes a new instance of the T:System.AggregateException class with a system-supplied message that describes the error.

Definition at line 35 of file AggregateException.cs.

◆ AggregateException() [2/7]

System.AggregateException.AggregateException ( string  message)

Initializes a new instance of the T:System.AggregateException class with a specified message that describes the error.

Parameters
messageThe message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Definition at line 44 of file AggregateException.cs.

◆ AggregateException() [3/7]

System.AggregateException.AggregateException ( string  message,
Exception  innerException 
)

Initializes a new instance of the T:System.AggregateException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Parameters
messageThe message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
innerExceptionThe exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.
Exceptions
T:System.ArgumentNullExceptionThe innerException argument is null.

Definition at line 55 of file AggregateException.cs.

◆ AggregateException() [4/7]

System.AggregateException.AggregateException ( IEnumerable< Exception innerExceptions)

Initializes a new instance of the T:System.AggregateException class with references to the inner exceptions that are the cause of this exception.

Parameters
innerExceptionsThe exceptions that are the cause of the current exception.
Exceptions
T:System.ArgumentNullExceptionThe innerExceptions argument is null.
T:System.ArgumentExceptionAn element of innerExceptions is null.

Definition at line 73 of file AggregateException.cs.

◆ AggregateException() [5/7]

System.AggregateException.AggregateException ( params Exception []  innerExceptions)

Initializes a new instance of the T:System.AggregateException class with references to the inner exceptions that are the cause of this exception.

Parameters
innerExceptionsThe exceptions that are the cause of the current exception.
Exceptions
T:System.ArgumentNullExceptionThe innerExceptions argument is null.
T:System.ArgumentExceptionAn element of innerExceptions is null.

Definition at line 83 of file AggregateException.cs.

◆ AggregateException() [6/7]

System.AggregateException.AggregateException ( string  message,
params Exception []  innerExceptions 
)

Initializes a new instance of the T:System.AggregateException class with a specified error message and references to the inner exceptions that are the cause of this exception.

Parameters
messageThe error message that explains the reason for the exception.
innerExceptionsThe exceptions that are the cause of the current exception.
Exceptions
T:System.ArgumentNullExceptionThe innerExceptions argument is null.
T:System.ArgumentExceptionAn element of innerExceptions is null.

Definition at line 105 of file AggregateException.cs.

◆ AggregateException() [7/7]

System.AggregateException.AggregateException ( SerializationInfo  info,
StreamingContext  context 
)
protected

Initializes a new instance of the T:System.AggregateException class with serialized data.

Parameters
infoThe object that holds the serialized object data.
contextThe contextual information about the source or destination.
Exceptions
T:System.ArgumentNullExceptionThe info argument is null.
T:System.Runtime.Serialization.SerializationExceptionThe exception could not be deserialized correctly.

Definition at line 168 of file AggregateException.cs.

Member Function Documentation

◆ AggregateException???()

System.AggregateException.AggregateException??? ( string  message,
IEnumerable< Exception innerExceptions 
)

Initializes a new instance of the T:System.AggregateException class with a specified error message and references to the inner exceptions that are the cause of this exception.

Parameters
messageThe error message that explains the reason for the exception.
innerExceptionsThe exceptions that are the cause of the current exception.
Exceptions
T:System.ArgumentNullExceptionThe innerExceptions argument is null.
T:System.ArgumentExceptionAn element of innerExceptions is null.

Definition at line 94 of file AggregateException.cs.

◆ Flatten()

AggregateException System.AggregateException.Flatten ( )

Flattens an T:System.AggregateException instances into a single, new instance.

Returns
A new, flattened T:System.AggregateException.

Definition at line 247 of file AggregateException.cs.

◆ GetBaseException()

override Exception System.AggregateException.GetBaseException ( )
virtual

Returns the T:System.AggregateException that is the root cause of this exception.

Returns
Returns the T:System.AggregateException that is the root cause of this exception.

Reimplemented from System.Exception.

Definition at line 203 of file AggregateException.cs.

◆ GetObjectData()

override void System.AggregateException.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
virtual

Initializes a new instance of the T:System.AggregateException class with serialized data.

Parameters
infoThe object that holds the serialized object data.
contextThe contextual information about the source or destination.
Exceptions
T:System.ArgumentNullExceptionThe info argument is null.

Reimplemented from System.Exception.

Definition at line 188 of file AggregateException.cs.

◆ Handle()

void System.AggregateException.Handle ( Func< Exception, bool >  predicate)

Invokes a handler on each T:System.Exception contained by this T:System.AggregateException.

Parameters
predicateThe predicate to execute for each exception. The predicate accepts as an argument the T:System.Exception to be processed and returns a Boolean to indicate whether the exception was handled.
Exceptions
T:System.ArgumentNullExceptionThe predicate argument is null.
T:System.AggregateExceptionAn exception contained by this T:System.AggregateException was not handled.

Definition at line 220 of file AggregateException.cs.

◆ ToString()

override string System.AggregateException.ToString ( )

Creates and returns a string representation of the current T:System.AggregateException.

Returns
A string representation of the current exception.

Implements System.Runtime.InteropServices._Exception.

Definition at line 279 of file AggregateException.cs.

Property Documentation

◆ InnerExceptions

ReadOnlyCollection<Exception> System.AggregateException.InnerExceptions
get

Gets a read-only collection of the T:System.Exception instances that caused the current exception.

Returns
Returns a read-only collection of the T:System.Exception instances that caused the current exception.

Definition at line 23 of file AggregateException.cs.


The documentation for this class was generated from the following file: