Get RAPTOR

RaptorSuiteSelectionMenu.Contributors

Registry of module sections in the selection's right-click menu.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0
public static class Contributors

Properties

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.

ParameterTypeDescription
idstringThe 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.

ParameterTypeDefaultDescription
idstringThe section's stable id.
contributorContributorAdds the section's rows.
orderint0Lower 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.