RaptorSuiteSelectionMenu.Contributors
Registry of module sections in the selection's right-click menu.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class ContributorsProperties
Count
public static int Count { get; }Gets the number of sections.
Ids
public static IReadOnlyList<string> Ids { get; }Gets a snapshot of every contributor id in menu order.
Version
public static int Version { get; }Gets a counter that increases by one on every change.
Methods
IsRegistered
public static bool IsRegistered(string id)Whether a section with this id is registered.
| Parameter | Type | Description |
|---|---|---|
id | string | The section's stable id. |
Returns: True when registered.
Register
public static bool Register(string id, Contributor contributor, int order = 0)Adds a section. Returns false and keeps the existing one when id is already registered. Throws for a blank id or a null contributor.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | The section's stable id. | |
contributor | Contributor | Adds the section's rows. | |
order | int | 0 | Lower comes first; ties keep registration order. |
Returns: False when the id is taken.
Call from an [InitializeOnLoad] static constructor on the main thread. A contributor that throws is logged and the other sections are still added.
Related types
- RaptorSuiteSelectionMenu: The selection's right-click menu.