Table of Contents

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

properties IDictionary<string, object>

The dictionary of properties.

key string

The property name.

value object

The 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

properties IDictionary<string, object>

The dictionary of properties.

key string

The property name.

value object

The property value.