PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Record­BuildersText­Log­Record­BuilderWrite­Custom­Parameter
Open sandboxFocus

TextLogRecordBuilder.WriteCustomParameter Method

WriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>)

Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.

Declaration
public override void WriteCustomParameter<T>(int index, ArraySegment<char> parameterName, T value, IFormatter<T> formatter)
Parameters
Type Name Description
System.Int32 index

Index of the custom parameter in the formatting string.

ArraySegment<Char> parameterName

Name of the custom parameter.

T value

Value of the custom parameter.

IFormatter<T> formatter

The formatter to be used to format value.

Type Parameters
Name Description
T

Type of the custom parameter.

Overrides
PostSharp.Patterns.Diagnostics.RecordBuilders.LogRecordBuilder.WriteCustomParameter<T>(System.Int32, System.ArraySegment<System.Char>, T, PostSharp.Patterns.Formatters.IFormatter<T>)

WriteCustomParameter<T>(Int32, in CharSpan, T, in CustomLogParameterOptions, IFormatter<T>)

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

Declaration
public override void WriteCustomParameter<T>(int index, in CharSpan parameterName, T value, in CustomLogParameterOptions options, IFormatter<T> formatter)
Parameters
Type Name Description
System.Int32 index

Index of the custom parameter in the formatting string.

CharSpan parameterName

Name of the custom parameter.

T value

Value of the custom parameter.

CustomLogParameterOptions options

Options.

IFormatter<T> formatter

The formatter to be used to format value.

Type Parameters
Name Description
T

Type of the custom parameter.

Overrides
PostSharp.Patterns.Diagnostics.RecordBuilders.LogRecordBuilder.WriteCustomParameter<T>(System.Int32, PostSharp.Patterns.Formatters.CharSpan, T, PostSharp.Patterns.Diagnostics.Custom.CustomLogParameterOptions, PostSharp.Patterns.Formatters.IFormatter<T>)