PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Record­BuildersLog­Record­BuilderSet­Parameter
Open sandboxFocus

LogRecordBuilder.SetParameter Method

SetParameter<T>(Int32, String, ParameterKind, String, T)

Sets the value of a given parameter and uses the default formatter.

Declaration
public void SetParameter<T>(int index, string parameterName, ParameterKind parameterKind, string typeName, T value)
Parameters
Type Name Description
System.Int32 index

Index of the parameter in the list of method parameters.

String parameterName

Name of the parameter (only included if the IncludeParameterName property is true).

ParameterKind parameterKind

The kind of the parameter (whether the parameter is by ref or by value, input or output).

String typeName

Formatted name of the type T (only included if the IncludeParameterType property is true).

T value

Value of the parameter (only included if the IncludeParameterValue property is true).

Type Parameters
Name Description
T

Type of the parameter.

SetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>)

Sets the value of a given parameter and specifies the Formatter<T>.

Declaration
public virtual void SetParameter<T>(int index, string parameterName, ParameterKind parameterKind, string typeName, T value, IFormatter<T> formatter)
Parameters
Type Name Description
System.Int32 index

Index of the parameter in the list of method parameters.

String parameterName

Name of the parameter (only included if the IncludeParameterName property is true).

ParameterKind parameterKind

The kind of the parameter (whether the parameter is by ref or by value, input or output).

String typeName

Formatted name of the type T (only included if the IncludeParameterType property is true).

T value

Value of the parameter (only included if the IncludeParameterValue property is true).

IFormatter<T> formatter

Formatter to be used to format value.

Type Parameters
Name Description
T

Type of the parameter.