PostSharp6.6//API Reference/Post­Sharp.​Patterns.​Diagnostics.​Record­Builders Namespace/Log­Record­Builder Class/Log­Record­Builder Methods/Log­Record­Builder.​Write­Custom­Parameter Method/Log­Record­Builder.​Write­Custom­Parameter(T) Method (Int32, Char­Span, T, Custom­Log­Parameter­Options, IFormatter(T))

LogRecordBuilder.WriteCustomParameter<T> Method (Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>)

Writes a custom parameter (passed as an CharSpan) and uses a given formatter.

Namespace:  PostSharp.Patterns.Diagnostics.RecordBuilders
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.6.10.0 (6.6.10.0)
Syntax
C#
public virtual void WriteCustomParameter<T>(
	int index,
	 in CharSpan parameterName,
	T value,
	 in CustomLogParameterOptions options,
	IFormatter<T> formatter
)

Parameters

index
Type: System.Int32
Index of the custom parameter in the formatting string.
parameterName
Type: PostSharp.Patterns.Formatters.CharSpanInAttribute
Name of the custom parameter.
value
Type: T
Value of the custom parameter.
options
Type: PostSharp.Patterns.Diagnostics.Custom.CustomLogParameterOptionsInAttribute
Options.
formatter
Type: PostSharp.Patterns.Formatters.IFormatter<T>
The formatter to be used to format value.

Type Parameters

T
Type of the custom parameter.
See Also