Class DictionaryValue
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
elementsIEnumerable<KeyValuePair<ScalarValue, LogEventPropertyValue>>The key-value mappings represented in the dictionary.
Exceptions
- ArgumentNullException
When
elementsisnull
Properties
Elements
The dictionary mapping.
public IReadOnlyDictionary<ScalarValue, LogEventPropertyValue> Elements { 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
outputTextWriterThe output.
formatstringA format string applied to the value, or null.
formatProviderIFormatProviderA format provider to apply to the value, or null to use the default.
Exceptions
- ArgumentNullException
When
outputisnull
- See Also