Table of Contents

Class IDictionaryExtensions

Namespace
Songhay.Publications.Extensions
Assembly
Songhay.Publications.dll
public static class IDictionaryExtensions
Inheritance
IDictionaryExtensions
Inherited Members

Methods

ToJsonString(IDictionary<string, object>?)

Converts the specified IDictionary<TKey, TValue> to a JSON string.

public static string? ToJsonString(this IDictionary<string, object>? data)

Parameters

data IDictionary<string, object>

the IDictionary<TKey, TValue>

Returns

string

ToTaggedDocument(IDictionary<string, object>?, ILogger?, params string[])

Converts the specified IDictionary<TKey, TValue> to IDocument

public static IDocument? ToTaggedDocument(this IDictionary<string, object>? data, ILogger? logger, params string[] tagKeys)

Parameters

data IDictionary<string, object>

the IDictionary<TKey, TValue>

logger ILogger

the ILogger

tagKeys string[]

the keys to search for tagging the IDocument

Returns

IDocument

Remarks

Tagging the IDocument sets Tag with serialized JSON key-value pairs from:

  • the conventional key, extract
  • keys specified in tagKeys