PostSharp6.0/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Record­Builders Namespace/Log­Record­Builder Class/Log­Record­Builder Methods/Log­Record­Builder.​Set­Parameter Method/Log­Record­Builder.​Set­Parameter(T) Method (Int32, String, Parameter­Kind, String, T)

LogRecordBuilder.SetParameter<T> Method (Int32, String, ParameterKind, String, T)

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

Namespace:  PostSharp.Patterns.Diagnostics.RecordBuilders
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.0.35.0 (6.0.35.0)
Syntax
C#
public void SetParameter<T>(
	int index,
	string parameterName,
	ParameterKind parameterKind,
	string typeName,
	T value
)

Parameters

index
Type: System.Int32
Index of the parameter in the list of method parameters.
parameterName
Type: System.String
Name of the parameter (only included if the IncludeParameterName property is true).
parameterKind
Type: PostSharp.Reflection.ParameterKind
The kind of the parameter (whether the parameter is by ref or by value, input or output).
typeName
Type: System.String
Formatted name of the type T (only included if the IncludeParameterType property is true).
value
Type: T
Value of the parameter (only included if the IncludeParameterValue property is true).

Type Parameters

T
Type of the parameter.
Remarks
The return value is set by the method SetReturnValue<T>(Int32, String, String, T). Thus the value of the parameterKind is never ReturnValue or ReturnRef.
See Also