LogHelper.LogArgumentException Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
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
Remarks
EventLevel is set to Error.
Applies to
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
Applies to
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.
- message
- String
message to log.
Returns
Remarks
EventLevel is set to Error.
Applies to
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
Remarks
EventLevel is set to Error.
Applies to
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.
- message
- String
message to log.
Returns
Applies to
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
Applies to
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.
- format
- String
Format string of the log message.
- args
- Object[]
An object array that contains zero or more objects to format.
Returns
Remarks
EventLevel is set to Error.
Applies to
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.
- format
- String
Format string of the log message.
- args
- Object[]
An object array that contains zero or more objects to format.