2025-05-01 01:48:08 -07:00

1.4 KiB
Raw Blame History

Dictionary source

The Dictionary source extracts objects with a matching Key from an IDictionary or IDictionary<string, object>.

When evaluating an IDictionary, if the Key is not a string, the Dictionary source first converts it to a string using the objects ToString method. The case sensitivity of the comparison is determined by the Smart Form Case Sensitivity option.

Example Smart String Arguments Result
{SomeKey}

[!code-cs]

999
Hello {Name} {Surname}

[!code-cs]

Hello Gordon Freeman
{Name} {Surname} scored {1:Score} points

[!code-cs]

Gordon Freeman scored 153 points

The following example shows how a dictionary could be provided as an argument.

[!code-cs]