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
KeystringUnique key within this plugin (e.g. "autoInterpretJson").
LabelstringHuman-readable label shown in the settings UI.
DescriptionstringOptional description shown below the label.
TypestringControl type: "bool", "string", "number", "select".
DefaultValueobjectDefault value (bool, string, number, or string for select).
OptionsIReadOnlyList<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
Description
Optional description shown below the label.
public string? Description { get; init; }
Property Value
Key
Unique key within this plugin (e.g. "autoInterpretJson").
public string Key { get; init; }
Property Value
Label
Human-readable label shown in the settings UI.
public string Label { get; init; }
Property Value
Options
For "select" type: list of { value, label } pairs.
public IReadOnlyList<BowirePluginSettingOption>? Options { get; init; }
Property Value
Type
Control type: "bool", "string", "number", "select".
public string Type { get; init; }
Property Value
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
KeystringLabelstringDescriptionstringTypestringDefaultValueobjectOptionsIReadOnlyList<BowirePluginSettingOption>
Equals(BowirePluginSetting?)
public bool Equals(BowirePluginSetting? other)
Parameters
otherBowirePluginSetting
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(BowirePluginSetting?, BowirePluginSetting?)
public static bool operator ==(BowirePluginSetting? left, BowirePluginSetting? right)
Parameters
leftBowirePluginSettingrightBowirePluginSetting
Returns
operator !=(BowirePluginSetting?, BowirePluginSetting?)
public static bool operator !=(BowirePluginSetting? left, BowirePluginSetting? right)
Parameters
leftBowirePluginSettingrightBowirePluginSetting