PostSharp 6.7 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Backends.​Serilog Namespace / Serilog­Log­Record­Builder Class / Serilog­Log­Record­Builder Methods / Serilog­Log­Record­Builder.​Append­Semantic­Parameter Method / Serilog­Log­Record­Builder.​Append­Semantic­Parameter Method (Semantic­Parameter­Kind, String, Object, IFormatter, String, Int32)

SerilogLogRecordBuilder.AppendSemanticParameter Method (SemanticParameterKind, String, Object, IFormatter, String, Int32)

Appends a parameter to the current StringBuilder, where the name is given as a String, and uses a specific formatter. Back-ends that support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder. This method overload is weakly typed.

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Serilog
Assembly:  PostSharp.Patterns.Diagnostics.Backends.Serilog (in PostSharp.Patterns.Diagnostics.Backends.Serilog.dll) Version: 6.7.12.0 (6.7.12.0)
Syntax
C#
protected override void AppendSemanticParameter(
	SemanticParameterKind kind,
	string name,
	Object value,
	IFormatter formatter,
	string prefix = null,
	int index = -1
)

Parameters

kind
Type: PostSharp.Patterns.Diagnostics.RecordBuilders.SemanticParameterKind
Kind of semantic parameter.
name
Type: System.String
Parameter name. The name parameter itself is not guaranteed to be unique in a given record. However, in combination with prefix and index, it is guaranteed to be unique.
value
Type: System.Object
Parameter value.
formatter
Type: PostSharp.Patterns.Formatters.IFormatter
The formatter to be used to format value.
prefix (Optional)
Type: System.String
Prefix to be prepended to name, or null if there is no prefix.
index (Optional)
Type: System.Int32
Index of the parameter value, if there are several values for the same parameter name, or -1 if there is a single parameter value for this parameter name.
See Also