PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Backends.​Application­InsightsApplication­Insights­Log­Record­BuilderAppend­Semantic­Parameter
Open sandboxFocus

ApplicationInsightsLogRecordBuilder.AppendSemanticParameter Method

AppendSemanticParameter(SemanticParameterKind, String, String, String, Int32)

Appends a parameter of String type to the current StringBuilder. Back-ends that support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder.

Declaration
protected override void AppendSemanticParameter(SemanticParameterKind kind, string name, string value, string prefix = null, int index = -1)
Parameters
Type Name Description
SemanticParameterKind kind

Kind of semantic parameter.

String name

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.

String value

Parameter value.

String prefix

Prefix to be prepended to name, or null if there is no prefix.

System.Int32 index

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.

Overrides
TextLogRecordBuilder.AppendSemanticParameter(SemanticParameterKind, String, String, String, Int32)

AppendSemanticParameter<T>(SemanticParameterKind, String, T, IFormatter<T>, 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 strongly typed.

Declaration
protected override void AppendSemanticParameter<T>(SemanticParameterKind kind, string name, T value, IFormatter<T> formatter, string prefix = null, int index = -1)
Parameters
Type Name Description
SemanticParameterKind kind

Kind of semantic parameter.

String name

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.

T value

Parameter value.

IFormatter<T> formatter

The formatter to be used to format value.

String prefix

Prefix to be prepended to name, or null if there is no prefix.

System.Int32 index

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.

Type Parameters
Name Description
T
Overrides
PostSharp.Patterns.Diagnostics.RecordBuilders.TextLogRecordBuilder.AppendSemanticParameter<T>(PostSharp.Patterns.Diagnostics.RecordBuilders.SemanticParameterKind, System.String, T, PostSharp.Patterns.Formatters.IFormatter<T>, System.String, System.Int32)

AppendSemanticParameter(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.

Declaration
protected override void AppendSemanticParameter(SemanticParameterKind kind, string name, object value, IFormatter formatter, string prefix = null, int index = -1)
Parameters
Type Name Description
SemanticParameterKind kind

Kind of semantic parameter.

String name

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.

System.Object value

Parameter value.

IFormatter formatter

The formatter to be used to format value.

String prefix

Prefix to be prepended to name, or null if there is no prefix.

System.Int32 index

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.

Overrides
TextLogRecordBuilder.AppendSemanticParameter(SemanticParameterKind, String, Object, IFormatter, String, Int32)

AppendSemanticParameter<T>(SemanticParameterKind, ArraySegment<Char>, T, IFormatter<T>, String, Int32)

Appends a parameter to the current StringBuilder, where the name is given as a ArraySegment<T>, and uses a specific formatter. Back-ends that support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder.

Declaration
protected override void AppendSemanticParameter<T>(SemanticParameterKind kind, ArraySegment<char> name, T value, IFormatter<T> formatter, string prefix = null, int index = -1)
Parameters
Type Name Description
SemanticParameterKind kind

Kind of semantic parameter.

ArraySegment<System.Char> name

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.

T value

Parameter value.

IFormatter<T> formatter

The formatter to be used to format value.

String prefix

Prefix to be prepended to name, or null if there is no prefix.

System.Int32 index

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.

Type Parameters
Name Description
T
Overrides
PostSharp.Patterns.Diagnostics.RecordBuilders.TextLogRecordBuilder.AppendSemanticParameter<T>(PostSharp.Patterns.Diagnostics.RecordBuilders.SemanticParameterKind, System.ArraySegment<System.Char>, T, PostSharp.Patterns.Formatters.IFormatter<T>, System.String, System.Int32)