Skip to content

ActionPlaceholders

Static class in Oadm.Sdk.Actions · Oadm.Sdk.dll

The placeholders of the event rule actions (everything OADM knows about the rule, the event and the device), one list for the server (ActionPlaceholders.Fill) and the rule dialog’s placeholder panel. The values of the event come on top, by their name ({objectId}, {port}); the fixed names win over event values of the same name.

public static class ActionPlaceholders
static IReadOnlyList<ActionPlaceholder> Fixed { get; }

Every placeholder OADM fills, in the order the rule dialog lists them.

static string Escape(string value, PlaceholderEscape escape)

Writes value for a text of the given format.

static string Fill(string? text, Func<string, string?> lookup, PlaceholderEscape escape = None)

Fills every {name} that lookup knows (case-insensitive names are the caller’s choice) in one pass, so a value that contains “{…}” is never filled again; unknown names stay as they are.

static string? FirstUnknown(string? text, IActionContext context)

The first “{name}” of text that context does not fill (SDK 0.12.0); null when it fills them all. It looks at the text of the settings, so a value that holds braces never counts. An action that changes a machine refuses to run on an unknown name instead of writing it literally.

const string DeviceGroup = "Device"

Placeholders of the device.

const string RuleGroup = "Rule"

Placeholders of the rule and the event.