Udostępnij za pośrednictwem


LogHelper.LogArgumentException Method

Definition

Overloads

LogArgumentException<T>(String, String)

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(EventLevel, String, String)

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(String, Exception, String)

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(String, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(EventLevel, String, Exception, String)

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(EventLevel, String, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(String, Exception, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(EventLevel, String, Exception, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

LogArgumentException<T>(String, String)

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (string argumentName, string message) where T : ArgumentException;
static member LogArgumentException : string * string -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (argumentName As String, message As String) As T

Type Parameters

T

Parameters

argumentName
String

Identifies the argument whose value generated the ArgumentException.

message
String

message to log.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogArgumentException<T>(EventLevel, String, String)

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, string message) where T : ArgumentException;
static member LogArgumentException : System.Diagnostics.Tracing.EventLevel * string * string -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (eventLevel As EventLevel, argumentName As String, message As String) As T

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

argumentName
String

Identifies the argument whose value generated the ArgumentException.

message
String

message to log.

Returns

T

Applies to

LogArgumentException<T>(String, Exception, String)

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (string argumentName, Exception innerException, string message) where T : ArgumentException;
static member LogArgumentException : string * Exception * string -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (argumentName As String, innerException As Exception, message As String) As T

Type Parameters

T

Parameters

argumentName
String

Identifies the argument whose value generated the ArgumentException.

innerException
Exception

the inner Exception to be added to the outer exception.

message
String

message to log.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogArgumentException<T>(String, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (string argumentName, string format, params object[] args) where T : ArgumentException;
static member LogArgumentException : string * string * obj[] -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (argumentName As String, format As String, ParamArray args As Object()) As T

Type Parameters

T

Parameters

argumentName
String

Identifies the argument whose value generated the ArgumentException.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogArgumentException<T>(EventLevel, String, Exception, String)

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, Exception innerException, string message) where T : ArgumentException;
static member LogArgumentException : System.Diagnostics.Tracing.EventLevel * string * Exception * string -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (eventLevel As EventLevel, argumentName As String, innerException As Exception, message As String) As T

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

argumentName
String

Identifies the argument whose value generated the ArgumentException.

innerException
Exception

the inner Exception to be added to the outer exception.

message
String

message to log.

Returns

T

Applies to

LogArgumentException<T>(EventLevel, String, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, string format, params object[] args) where T : ArgumentException;
static member LogArgumentException : System.Diagnostics.Tracing.EventLevel * string * string * obj[] -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (eventLevel As EventLevel, argumentName As String, format As String, ParamArray args As Object()) As T

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

argumentName
String

Identifies the argument whose value generated the ArgumentException.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Applies to

LogArgumentException<T>(String, Exception, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (string argumentName, Exception innerException, string format, params object[] args) where T : ArgumentException;
static member LogArgumentException : string * Exception * string * obj[] -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (argumentName As String, innerException As Exception, format As String, ParamArray args As Object()) As T

Type Parameters

T

Parameters

argumentName
String

Identifies the argument whose value generated the ArgumentException.

innerException
Exception

the inner Exception to be added to the outer exception.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogArgumentException<T>(EventLevel, String, Exception, String, Object[])

Logs an argument exception using the event source logger and returns new typed exception.

public static T LogArgumentException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, Exception innerException, string format, params object[] args) where T : ArgumentException;
static member LogArgumentException : System.Diagnostics.Tracing.EventLevel * string * Exception * string * obj[] -> 'T (requires 'T :> ArgumentException)
Public Shared Function LogArgumentException(Of T As ArgumentException) (eventLevel As EventLevel, argumentName As String, innerException As Exception, format As String, ParamArray args As Object()) As T

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

argumentName
String

Identifies the argument whose value generated the ArgumentException.

innerException
Exception

the inner Exception to be added to the outer exception.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Applies to