Skip to content

RecipientType

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

A kind of recipient (SDK 0.11.0): where and how to reach something, shared by the rules that choose it. Declared by an action plugin (IActionPlugin.RecipientTypes), so a type is never hard-coded in the host.

public sealed record RecipientType(string Id, string DisplayName, string? IconKey, IReadOnlyList<ActionField> Fields, string TestActionId)

Parameters

  • Id: Unique id (“oadm.notifications.recipient.email”).
  • DisplayName: What the Type select and the Type column show (“Email”).
  • IconKey: Icon key; null = none.
  • Fields: The fields of a recipient, the ActionField kinds with their checks. Password fields are stored encrypted.
  • TestActionId: The action that sends the test of this type, with its default values.
string DisplayName { get; init; }

What the Type select and the Type column show (“Email”).

IReadOnlyList<ActionField> Fields { get; init; }

The fields of a recipient, the ActionField kinds with their checks. Password fields are stored encrypted.

string? IconKey { get; init; }

Icon key; null = none.

string Id { get; init; }

Unique id (“oadm.notifications.recipient.email”).

IRecipientSessionFactory? Sessions { get; init; }

Null for a one shot type (open, send, close inside the action). Set: a persistent type (SDK 0.12.0), one open connection the rules share, which the action reads with IActionContext.SessionAsync; Test only connects, it sends nothing.

string? Target { get; init; }

The one-line target of the Recipients list, with {key} for a field’s value (“{host}:{port}”). Null: the first field.

string TestActionId { get; init; }

The action that sends the test of this type, with its default values.

const int MaxNameLength = 64

The longest name of a recipient.

const string NameInvalidText = "Use letters, digits and punctuation only."

The refusal of a name with a line break, a tab or another control character.

const string NameTakenText = "A recipient with this name already exists."

The refusal of a name another recipient has.

const string NotFoundText = "The recipient no longer exists."

The refusal of an id that is gone.