13 [DebuggerDisplay(
"Count = {InnerExceptionCount}")]
14 [__DynamicallyInvokable]
21 [__DynamicallyInvokable]
24 [__DynamicallyInvokable]
27 return m_innerExceptions;
34 [__DynamicallyInvokable]
36 : base(
Environment.GetResourceString(
"AggregateException_ctor_DefaultMessage"))
43 [__DynamicallyInvokable]
54 [__DynamicallyInvokable]
56 : base(message, innerException)
58 if (innerException ==
null)
72 [__DynamicallyInvokable]
74 : this(
Environment.GetResourceString(
"AggregateException_ctor_DefaultMessage"), innerExceptions)
82 [__DynamicallyInvokable]
84 : this(
Environment.GetResourceString(
"AggregateException_ctor_DefaultMessage"), innerExceptions)
93 [__DynamicallyInvokable]
104 [__DynamicallyInvokable]
111 : base(message, (innerExceptions != null && innerExceptions.Count > 0) ? innerExceptions[0] : null)
113 if (innerExceptions ==
null)
118 for (
int i = 0; i < array.Length; i++)
120 array[i] = innerExceptions[i];
121 if (array[i] ==
null)
123 throw new ArgumentException(Environment.GetResourceString(
"AggregateException_ctor_InnerExceptionNull"));
130 : this(Environment.GetResourceString(
"AggregateException_ctor_DefaultMessage"), innerExceptionInfos)
140 : base(message, (innerExceptionInfos != null && innerExceptionInfos.Count > 0 && innerExceptionInfos[0] != null) ? innerExceptionInfos[0].SourceException : null)
142 if (innerExceptionInfos ==
null)
144 throw new ArgumentNullException(
"innerExceptionInfos");
147 for (
int i = 0; i < array.Length; i++)
150 if (exceptionDispatchInfo !=
null)
154 if (array[i] ==
null)
156 throw new ArgumentException(Environment.GetResourceString(
"AggregateException_ctor_InnerExceptionNull"));
169 : base(info, context)
194 base.GetObjectData(info, context);
196 m_innerExceptions.
CopyTo(array, 0);
197 info.AddValue(
"InnerExceptions", array, typeof(
Exception[]));
202 [__DynamicallyInvokable]
219 [__DynamicallyInvokable]
220 public void Handle(Func<Exception, bool> predicate)
222 if (predicate ==
null)
227 for (
int i = 0; i < m_innerExceptions.
Count; i++)
229 if (!predicate(m_innerExceptions[i]))
235 list.Add(m_innerExceptions[i]);
246 [__DynamicallyInvokable]
253 while (list2.
Count > num)
256 for (
int i = 0; i < innerExceptions.
Count; i++)
278 [__DynamicallyInvokable]
281 string text = base.ToString();
282 for (
int i = 0; i < m_innerExceptions.
Count; i++)
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
static string NewLine
Gets the newline string defined for this environment.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
AggregateException(params Exception[] innerExceptions)
Initializes a new instance of the T:System.AggregateException class with references to the inner exce...
int Count
Gets the number of elements contained in the T:System.Collections.Generic.List`1.
Provides the base class for a generic read-only collection.
void Handle(Func< Exception, bool > predicate)
Invokes a handler on each T:System.Exception contained by this T:System.AggregateException.
int Count
Gets the number of elements contained in the T:System.Collections.ObjectModel.ReadOnlyCollection`1 in...
Exposes the enumerator, which supports a simple iteration over a collection of a specified type....
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Represents one or more errors that occur during application execution.
override Exception GetBaseException()
Returns the T:System.AggregateException that is the root cause of this exception.
Represents an exception whose state is captured at a certain point in code.
void Add(T item)
Adds an object to the end of the T:System.Collections.Generic.List`1.
Provides information about, and means to manipulate, the current environment and platform....
AggregateException(string message, params Exception[] innerExceptions)
Initializes a new instance of the T:System.AggregateException class with a specified error message an...
override void GetObjectData(SerializationInfo info, StreamingContext context)
Initializes a new instance of the T:System.AggregateException class with serialized data.
Exception SourceException
Gets the exception that is represented by the current instance.
Exception InnerException
Gets the T:System.Exception instance that caused the current exception.
The exception thrown when an error occurs during serialization or deserialization.
virtual string Message
Gets a message that describes the current exception.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
AggregateException(string message, Exception innerException)
Initializes a new instance of the T:System.AggregateException class with a specified error message an...
Represents a collection of objects that can be individually accessed by index.
Exception()
Initializes a new instance of the T:System.Exception class.
override string ToString()
Creates and returns a string representation of the current T:System.AggregateException.
int Count
Gets the number of elements contained in the T:System.Collections.Generic.ICollection`1.
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
void CopyTo(T[] array, int index)
Copies the entire T:System.Collections.ObjectModel.ReadOnlyCollection`1 to a compatible one-dimension...
ReadOnlyCollection< Exception > InnerExceptions
Gets a read-only collection of the T:System.Exception instances that caused the current exception.
Specifies that the class can be serialized.
AggregateException Flatten()
Flattens an T:System.AggregateException instances into a single, new instance.
AggregateException(string message)
Initializes a new instance of the T:System.AggregateException class with a specified message that des...
AggregateException(IEnumerable< Exception > innerExceptions)
Initializes a new instance of the T:System.AggregateException class with references to the inner exce...
AggregateException(SerializationInfo info, StreamingContext context)
Initializes a new instance of the T:System.AggregateException class with serialized data.
Provides information about a specific culture (called a locale for unmanaged code development)....
AggregateException()
Initializes a new instance of the T:System.AggregateException class with a system-supplied message th...