EventDefinition<TParam>.GenerateMessage Method

Definition

Overloads

GenerateMessage(TParam)

Generates the message that would be logged without logging it. Typically used for throwing an exception in warning-as-error cases.

GenerateMessage(TParam, Exception)

Generates the message that would be logged without logging it. Typically used for throwing an exception in warning-as-error cases.

GenerateMessage(TParam)

Generates the message that would be logged without logging it. Typically used for throwing an exception in warning-as-error cases.

public virtual string GenerateMessage (TParam arg);
abstract member GenerateMessage : 'Param -> string
override this.GenerateMessage : 'Param -> string
Public Overridable Function GenerateMessage (arg As TParam) As String

Parameters

arg
TParam

The message argument.

Returns

The message string.

Applies to

GenerateMessage(TParam, Exception)

Generates the message that would be logged without logging it. Typically used for throwing an exception in warning-as-error cases.

public virtual string GenerateMessage (TParam arg, Exception exception = default);
abstract member GenerateMessage : 'Param * Exception -> string
override this.GenerateMessage : 'Param * Exception -> string
Public Overridable Function GenerateMessage (arg As TParam, Optional exception As Exception = Nothing) As String

Parameters

arg
TParam

The message argument.

exception
Exception

Optional exception associated with this event.

Returns

The message string.

Applies to