Class MetadataInputExtensions
- Namespace
- FlowOrchestrator.Core.Abstractions
- Assembly
- FlowOrchestrator.Core.dll
Extension methods for extracting typed values from step or trigger input dictionaries. Handles both strongly-typed CLR values and JsonElement representations, which occur when inputs are deserialized from JSON manifests.
public static class MetadataInputExtensions
- Inheritance
-
MetadataInputExtensions
- Inherited Members
Methods
TryGetBoolean(IDictionary<string, object?>, string, out bool)
Tries to read a boolean from inputs at key,
accepting native bool, JSON true/false literals, and parseable strings.
public static bool TryGetBoolean(this IDictionary<string, object?> inputs, string key, out bool value)
Parameters
inputsIDictionary<string, object>The input dictionary to read from.
keystringThe input key to look up.
valueboolThe parsed boolean, or false if not found.
Returns
TryGetDateTimeOffset(IDictionary<string, object?>, string, out DateTimeOffset)
Tries to read a DateTimeOffset from inputs at key.
Accepts ISO 8601 strings and JsonElement string values; parses with round-trip kind.
public static bool TryGetDateTimeOffset(this IDictionary<string, object?> inputs, string key, out DateTimeOffset value)
Parameters
inputsIDictionary<string, object>The input dictionary to read from.
keystringThe input key to look up.
valueDateTimeOffsetThe parsed DateTimeOffset, or
defaultif not found.
Returns
TryGetInt32(IDictionary<string, object?>, string, out int)
Tries to read a 32-bit integer from inputs at key,
accepting int, long (within range), and numeric or string JsonElement values.
public static bool TryGetInt32(this IDictionary<string, object?> inputs, string key, out int value)
Parameters
inputsIDictionary<string, object>The input dictionary to read from.
keystringThe input key to look up.
valueintThe parsed integer, or
0if not found or conversion fails.
Returns
TryGetString(IDictionary<string, object?>, string, out string)
Tries to read a string value from inputs at key,
normalising numeric and boolean JsonElement variants to their string forms.
public static bool TryGetString(this IDictionary<string, object?> inputs, string key, out string value)
Parameters
inputsIDictionary<string, object>The input dictionary to read from.
keystringThe input key to look up.
valuestringThe resolved string value, or Empty if not found.