Serilog.Events.DictionaryValue.DictionaryValue C# (CSharp) Method

DictionaryValue() public method

Create a DictionaryValue with the provided elements.
public DictionaryValue ( LogEventPropertyValue>.IEnumerable elements ) : System
elements LogEventPropertyValue>.IEnumerable The key-value mappings represented in the dictionary.
return System
        public DictionaryValue(IEnumerable<KeyValuePair<ScalarValue, LogEventPropertyValue>> elements)
        {
            if (elements == null) throw new ArgumentNullException(nameof(elements));
            Elements = elements.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
        }