Class MessagePropertyEx
- Namespace
- Arc4u.Diagnostics
- Assembly
- Arc4u.Diagnostics.dll
Extension methods to add entries to a dictionary of log properties.
public static class MessagePropertyEx
- Inheritance
-
MessagePropertyEx
- Inherited Members
Methods
AddIfNotExist(IDictionary<string, object?>, string, object)
Adds the property only when value is not null and the key is not already present.
public static void AddIfNotExist(this IDictionary<string, object?> properties, string key, object value)
Parameters
propertiesIDictionary<string, object>The dictionary of properties.
keystringThe property name.
valueobjectThe property value.
AddOrReplace(IDictionary<string, object?>, string, object)
Sets the property, replacing any existing value for the key.
public static void AddOrReplace(this IDictionary<string, object?> properties, string key, object value)
Parameters
propertiesIDictionary<string, object>The dictionary of properties.
keystringThe property name.
valueobjectThe property value.