Skip to content

ActionInvocation

Record in Oadm.Sdk.Actions · Oadm.Sdk.dll

One run of an action on one target (a device, or none for actions without IActionPlugin.NeedsDevice). Settings are the action’s settings with password fields decrypted.

public sealed record ActionInvocation(Guid RuleId, string RuleName, ActionEdge Edge, JsonElement Settings, IDeviceInfo? Device, ActionTrigger Trigger)

Guide: Event rules

Parameters

  • RuleId: The rule.
  • RuleName: Its name.
  • Edge: Why the action runs.
  • Settings: The settings of the action, passwords decrypted.
  • Device: The target device; null for actions without devices.
  • Trigger: What happened.
IDeviceInfo? Device { get; init; }

The target device; null for actions without devices.

ActionEdge Edge { get; init; }

Why the action runs.

Guid RuleId { get; init; }

The rule.

string RuleName { get; init; }

Its name.

JsonElement Settings { get; init; }

The settings of the action, passwords decrypted.

ActionTrigger Trigger { get; init; }

What happened.

string? Get(string key)

A setting as text (null when missing or null).

bool GetBool(string key)

A check box setting.

int GetInt(string key, int fallback)

A number setting; fallback when missing or not a number.

IReadOnlyList<KeyValuePair<string, string>> GetPairs(string key)

The rows of a ActionFieldType.KeyValues setting, in order; rows without a name are left out.