Class BowirePluginSetting

Namespace
Kuestenlogik.Bowire
Assembly
Kuestenlogik.Bowire.dll

Describes a single setting that a protocol plugin contributes to the Bowire Settings dialog. The UI renders a control (toggle, text, number, select) based on the Type and persists the value in localStorage under bowire_plugin_{pluginId}_{Key}.

public sealed record BowirePluginSetting : IEquatable<BowirePluginSetting>
Inheritance
BowirePluginSetting
Implements
Inherited Members

Constructors

BowirePluginSetting(string, string, string?, string, object?, IReadOnlyList<BowirePluginSettingOption>?)

Describes a single setting that a protocol plugin contributes to the Bowire Settings dialog. The UI renders a control (toggle, text, number, select) based on the Type and persists the value in localStorage under bowire_plugin_{pluginId}_{Key}.

public BowirePluginSetting(string Key, string Label, string? Description = null, string Type = "bool", object? DefaultValue = null, IReadOnlyList<BowirePluginSettingOption>? Options = null)

Parameters

Key string

Unique key within this plugin (e.g. "autoInterpretJson").

Label string

Human-readable label shown in the settings UI.

Description string

Optional description shown below the label.

Type string

Control type: "bool", "string", "number", "select".

DefaultValue object

Default value (bool, string, number, or string for select).

Options IReadOnlyList<BowirePluginSettingOption>

For "select" type: list of { value, label } pairs.

Properties

DefaultValue

Default value (bool, string, number, or string for select).

public object? DefaultValue { get; init; }

Property Value

object

Description

Optional description shown below the label.

public string? Description { get; init; }

Property Value

string

Key

Unique key within this plugin (e.g. "autoInterpretJson").

public string Key { get; init; }

Property Value

string

Label

Human-readable label shown in the settings UI.

public string Label { get; init; }

Property Value

string

Options

For "select" type: list of { value, label } pairs.

public IReadOnlyList<BowirePluginSettingOption>? Options { get; init; }

Property Value

IReadOnlyList<BowirePluginSettingOption>

Type

Control type: "bool", "string", "number", "select".

public string Type { get; init; }

Property Value

string

Methods

Deconstruct(out string, out string, out string?, out string, out object?, out IReadOnlyList<BowirePluginSettingOption>?)

public void Deconstruct(out string Key, out string Label, out string? Description, out string Type, out object? DefaultValue, out IReadOnlyList<BowirePluginSettingOption>? Options)

Parameters

Key string
Label string
Description string
Type string
DefaultValue object
Options IReadOnlyList<BowirePluginSettingOption>

Equals(BowirePluginSetting?)

public bool Equals(BowirePluginSetting? other)

Parameters

other BowirePluginSetting

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(BowirePluginSetting?, BowirePluginSetting?)

public static bool operator ==(BowirePluginSetting? left, BowirePluginSetting? right)

Parameters

left BowirePluginSetting
right BowirePluginSetting

Returns

bool

operator !=(BowirePluginSetting?, BowirePluginSetting?)

public static bool operator !=(BowirePluginSetting? left, BowirePluginSetting? right)

Parameters

left BowirePluginSetting
right BowirePluginSetting

Returns

bool