EventSourceException Konstruktorer

Definition

Initierar en ny instans av EventSourceException klassen.

Överlagringar

Name Description
EventSourceException()

Initierar en ny instans av EventSourceException klassen.

EventSourceException(String)

Initierar en ny instans av EventSourceException klassen med ett angivet felmeddelande.

EventSourceException(SerializationInfo, StreamingContext)
Föråldrad.

Initierar en ny instans av EventSourceException klassen med serialiserade data.

EventSourceException(String, Exception)

Initierar en ny instans av EventSourceException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

EventSourceException()

Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs

Initierar en ny instans av EventSourceException klassen.

public:
 EventSourceException();
public EventSourceException();
Public Sub New ()

Gäller för

EventSourceException(String)

Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs

Initierar en ny instans av EventSourceException klassen med ett angivet felmeddelande.

public:
 EventSourceException(System::String ^ message);
public EventSourceException(string message);
public EventSourceException(string? message);
new System.Diagnostics.Tracing.EventSourceException : string -> System.Diagnostics.Tracing.EventSourceException
Public Sub New (message As String)

Parametrar

message
String

Meddelandet som beskriver felet.

Gäller för

EventSourceException(SerializationInfo, StreamingContext)

Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs

Varning

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initierar en ny instans av EventSourceException klassen med serialiserade data.

protected:
 EventSourceException(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 EventSourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected EventSourceException(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 System.Diagnostics.Tracing.EventSourceException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Diagnostics.Tracing.EventSourceException
new System.Diagnostics.Tracing.EventSourceException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Diagnostics.Tracing.EventSourceException
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

Gäller för

EventSourceException(String, Exception)

Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs
Källa:
EventSourceException.cs

Initierar en ny instans av EventSourceException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

public:
 EventSourceException(System::String ^ message, Exception ^ innerException);
public EventSourceException(string message, Exception innerException);
public EventSourceException(string? message, Exception? innerException);
new System.Diagnostics.Tracing.EventSourceException : string * Exception -> System.Diagnostics.Tracing.EventSourceException
Public Sub New (message As String, innerException As Exception)

Parametrar

message
String

Felmeddelandet som förklarar orsaken till undantaget.

innerException
Exception

Undantaget som är orsaken till det aktuella undantaget eller null om inget inre undantag har angetts.

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.

Gäller för