RaptorModule
One row of Settings → Modules.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
The Settings page and every gate call Detect, so keep it cheap. Fix is optional and is offered while the state is not On.
public sealed class RaptorModuleConstructors
RaptorModule
public RaptorModule(string id, string label, RaptorModuleKind kind, Func<RaptorModuleStatus> detect = null, string fixLabel = null, Action fix = null)Creates a module row.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | The row's unique id. | |
label | string | Display name; empty uses the id. | |
kind | RaptorModuleKind | The group the row is listed under. | |
detect | Func<RaptorModuleStatus> | null | Returns the module's state; null means On. |
fixLabel | string | null | Fix button label; empty uses "Fix". |
fix | Action | null | The fix action; null means no fix button. |
Properties
Detect
public Func<RaptorModuleStatus> Detect { get; }Gets the state detector. Null means the state is On.
Fix
public Action Fix { get; }Gets the one-click fix, offered while the state is not On. Null means no fix button.
FixLabel
public string FixLabel { get; }Gets the fix button label, or null when there is no Fix.
Id
public string Id { get; }Gets the row's unique id.
Kind
public RaptorModuleKind Kind { get; }Gets the group the row is listed under.
Label
public string Label { get; }Gets the row's display name.
Related types
- RaptorModuleStatus: A module's state and its status word (for example "On", "No masks", "Fog OK").
- RaptorModuleKind: Whether a RaptorModule is a RAPTOR add-on, a third-party integration, or project code.