Class StructureValue
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
stringOptionally, a piece of metadata describing the "type" of the structure. Can be
.null
Exceptions
- ArgumentNullException
When
properties
isnull
Properties
Properties
The properties of the structure.
public IReadOnlyList<LogEventProperty> Properties { get; }
Property Value
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
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
TextWriterThe output.
format
stringA format string applied to the value, or null.
formatProvider
IFormatProviderA format provider to apply to the value, or null to use the default.
Exceptions
- ArgumentNullException
When
output
isnull
- See Also