Share via


EventDefinition<TParam1,TParam2,TParam3>.GenerateMessage Method

Definition

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 (TParam1 arg1, TParam2 arg2, TParam3 arg3, Exception exception = default);
public virtual string GenerateMessage (TParam1 arg1, TParam2 arg2, TParam3 arg3, Exception? exception = default);
abstract member GenerateMessage : 'TParam1 * 'TParam2 * 'TParam3 * Exception -> string
override this.GenerateMessage : 'TParam1 * 'TParam2 * 'TParam3 * Exception -> string
Public Overridable Function GenerateMessage (arg1 As TParam1, arg2 As TParam2, arg3 As TParam3, Optional exception As Exception = Nothing) As String

Parameters

arg1
TParam1

The first message argument.

arg2
TParam2

The second message argument.

arg3
TParam3

The third message argument.

exception
Exception

Optional exception associated with this event.

Returns

The message string.

Applies to