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
elements
IEnumerable<KeyValuePair<ScalarValue, LogEventPropertyValue>>The key-value mappings represented in the dictionary.
Exceptions
- ArgumentNullException
When
elements
isnull
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
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