AggregateException Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av AggregateException klassen.
Överlagringar
| Name | Description |
|---|---|
| AggregateException() |
Initierar en ny instans av AggregateException klassen med ett systemmeddelande som beskriver felet. |
| AggregateException(IEnumerable<Exception>) |
Initierar en ny instans av AggregateException klassen med referenser till de inre undantag som är orsaken till det här undantaget. |
| AggregateException(Exception[]) |
Initierar en ny instans av AggregateException klassen med referenser till de inre undantag som är orsaken till det här undantaget. |
| AggregateException(String) |
Initierar en ny instans av AggregateException klassen med ett angivet meddelande som beskriver felet. |
| AggregateException(SerializationInfo, StreamingContext) |
Föråldrad.
Initierar en ny instans av AggregateException klassen med serialiserade data. |
| AggregateException(String, IEnumerable<Exception>) |
Initierar en ny instans av AggregateException klassen med ett angivet felmeddelande och referenser till de inre undantag som är orsaken till det här undantaget. |
| AggregateException(String, Exception) |
Initierar en ny instans av AggregateException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget. |
| AggregateException(String, Exception[]) |
Initierar en ny instans av AggregateException klassen med ett angivet felmeddelande och referenser till de inre undantag som är orsaken till det här undantaget. |
AggregateException()
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med ett systemmeddelande som beskriver felet.
public:
AggregateException();
public AggregateException();
Public Sub New ()
Kommentarer
Den här konstruktorn initierar egenskapen för den nya instansen Message till ett meddelande från systemet som beskriver felet, till exempel "System.AggregateException: Ett eller flera fel inträffade". Det här meddelandet tar hänsyn till den aktuella systemkulturen.
I följande tabell visas de inledande egenskapsvärdena för en instans av AggregateException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Den lokaliserade felmeddelandesträngen. |
Se även
Gäller för
AggregateException(IEnumerable<Exception>)
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med referenser till de inre undantag som är orsaken till det här undantaget.
public:
AggregateException(System::Collections::Generic::IEnumerable<Exception ^> ^ innerExceptions);
public AggregateException(System.Collections.Generic.IEnumerable<Exception> innerExceptions);
new AggregateException : seq<Exception> -> AggregateException
Public Sub New (innerExceptions As IEnumerable(Of Exception))
Parametrar
- innerExceptions
- IEnumerable<Exception>
De undantag som är orsaken till det aktuella undantaget.
Undantag
Argumentet innerExceptions är null.
Ett element i innerExceptions är null.
Gäller för
AggregateException(Exception[])
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med referenser till de inre undantag som är orsaken till det här undantaget.
public:
AggregateException(... cli::array <Exception ^> ^ innerExceptions);
public AggregateException(params Exception[] innerExceptions);
new AggregateException : Exception[] -> AggregateException
Public Sub New (ParamArray innerExceptions As Exception())
Parametrar
- innerExceptions
- Exception[]
De undantag som är orsaken till det aktuella undantaget.
Undantag
Argumentet innerExceptions är null.
Ett element i innerExceptions är null.
Gäller för
AggregateException(String)
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med ett angivet meddelande som beskriver felet.
public:
AggregateException(System::String ^ message);
public AggregateException(string message);
public AggregateException(string? message);
new AggregateException : string -> AggregateException
Public Sub New (message As String)
Parametrar
- message
- String
Meddelandet som beskriver undantaget. Anroparen för den här konstruktorn krävs för att säkerställa att den här strängen har lokaliserats för den aktuella systemkulturen.
Kommentarer
I följande tabell visas de inledande egenskapsvärdena för en instans av AggregateException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Felmeddelandesträngen som anges i message. |
Se även
Gäller för
AggregateException(SerializationInfo, StreamingContext)
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Varning
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initierar en ny instans av AggregateException klassen med serialiserade data.
protected:
AggregateException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new AggregateException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> AggregateException
new AggregateException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> AggregateException
[<System.Security.SecurityCritical>]
new AggregateException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> AggregateException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parametrar
- info
- SerializationInfo
Objektet som innehåller serialiserade objektdata.
- context
- StreamingContext
Sammanhangsinformation om källan eller målet.
- Attribut
Undantag
Argumentet info är null.
Undantaget kunde inte deserialiseras korrekt.
Kommentarer
Den här konstruktorn anropas under deserialiseringen för att återskapa undantagsobjektet som överförs via en ström. Mer information finns i XML- och SOAP-serialisering.
Se även
Gäller för
AggregateException(String, IEnumerable<Exception>)
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med ett angivet felmeddelande och referenser till de inre undantag som är orsaken till det här undantaget.
public:
AggregateException(System::String ^ message, System::Collections::Generic::IEnumerable<Exception ^> ^ innerExceptions);
public AggregateException(string message, System.Collections.Generic.IEnumerable<Exception> innerExceptions);
public AggregateException(string? message, System.Collections.Generic.IEnumerable<Exception> innerExceptions);
new AggregateException : string * seq<Exception> -> AggregateException
Public Sub New (message As String, innerExceptions As IEnumerable(Of Exception))
Parametrar
- message
- String
Felmeddelandet som förklarar orsaken till undantaget.
- innerExceptions
- IEnumerable<Exception>
De undantag som är orsaken till det aktuella undantaget.
Undantag
Argumentet innerExceptions är null.
Ett element i innerExceptions är null.
Gäller för
AggregateException(String, Exception)
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.
public:
AggregateException(System::String ^ message, Exception ^ innerException);
public AggregateException(string message, Exception innerException);
public AggregateException(string? message, Exception innerException);
new AggregateException : string * Exception -> AggregateException
Public Sub New (message As String, innerException As Exception)
Parametrar
- message
- String
Meddelandet som beskriver undantaget. Anroparen för den här konstruktorn krävs för att säkerställa att den här strängen har lokaliserats för den aktuella systemkulturen.
- innerException
- Exception
Undantaget som är orsaken till det aktuella undantaget. Om parametern innerException inte nullär genereras det aktuella undantaget i ett catch block som hanterar det inre undantaget.
Undantag
Argumentet innerException är null.
Kommentarer
Ett undantag som genereras som ett direkt resultat av ett tidigare undantag bör innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till konstruktorn, eller null om InnerException egenskapen inte anger det inre undantagsvärdet till konstruktorn.
I följande tabell visas de inledande egenskapsvärdena för en instans av AggregateException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Felmeddelandesträngen som anges i message. |
Se även
Gäller för
AggregateException(String, Exception[])
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
- Källa:
- AggregateException.cs
Initierar en ny instans av AggregateException klassen med ett angivet felmeddelande och referenser till de inre undantag som är orsaken till det här undantaget.
public:
AggregateException(System::String ^ message, ... cli::array <Exception ^> ^ innerExceptions);
public AggregateException(string message, params Exception[] innerExceptions);
public AggregateException(string? message, params Exception[] innerExceptions);
new AggregateException : string * Exception[] -> AggregateException
Public Sub New (message As String, ParamArray innerExceptions As Exception())
Parametrar
- message
- String
Felmeddelandet som förklarar orsaken till undantaget.
- innerExceptions
- Exception[]
De undantag som är orsaken till det aktuella undantaget.
Undantag
Argumentet innerExceptions är null.
Ett element i innerExceptions är null.