Table of Contents

Class StructureValue

Namespace
Serilog.Events
Assembly
Serilog.dll

A value represented as a collection of name-value properties.

public class StructureValue : LogEventPropertyValue, IFormattable
Inheritance
StructureValue
Implements
Inherited Members

Constructors

StructureValue(IEnumerable<LogEventProperty>, string?)

Construct a StructureValue with the provided properties.

public StructureValue(IEnumerable<LogEventProperty> properties, string? typeTag = null)

Parameters

properties IEnumerable<LogEventProperty>

The properties of the structure.

typeTag string

Optionally, a piece of metadata describing the "type" of the structure. Can be

null
.

Exceptions

ArgumentNullException

When properties is

null

Properties

Properties

The properties of the structure.

public IReadOnlyList<LogEventProperty> Properties { get; }

Property Value

IReadOnlyList<LogEventProperty>

Remarks

Not presented as a dictionary because dictionary construction is relatively expensive; it is cheaper to build a dictionary over properties only when the structure is of interest.

TypeTag

A piece of metadata describing the "type" of the structure, or null.

public string? TypeTag { get; }

Property Value

string

Methods

Render(TextWriter, string?, IFormatProvider?)

Render the value to the output.

public override void Render(TextWriter output, string? format = null, IFormatProvider? formatProvider = null)

Parameters

output TextWriter

The output.

format string

A format string applied to the value, or null.

formatProvider IFormatProvider

A format provider to apply to the value, or null to use the default.

Exceptions

ArgumentNullException

When output is

null
See Also