Table of Contents

Class DictionaryValue

Namespace
Serilog.Events
Assembly
Serilog.dll

A value represented as a mapping from keys to values.

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

Constructors

DictionaryValue(IEnumerable<KeyValuePair<ScalarValue, LogEventPropertyValue>>)

Create a DictionaryValue with the provided elements.

public DictionaryValue(IEnumerable<KeyValuePair<ScalarValue, LogEventPropertyValue>> elements)

Parameters

elements IEnumerable<KeyValuePair<ScalarValue, LogEventPropertyValue>>

The key-value mappings represented in the dictionary.

Exceptions

ArgumentNullException

When elements is

null

Properties

Elements

The dictionary mapping.

public IReadOnlyDictionary<ScalarValue, LogEventPropertyValue> Elements { get; }

Property Value

IReadOnlyDictionary<ScalarValue, LogEventPropertyValue>

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