Table of Contents

Class CommandCatalogAttribute

Namespace
Hi.SessionCommands
Assembly
HiNc.dll

Marks an ISessionCommand as user-addable: GUIs build their “Add Command” catalog from the commands carrying this attribute, grouped by Category. A command WITHOUT this attribute stays loadable from project files (its Reg registration is unaffected) but is not offered for creation.

[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class CommandCatalogAttribute : Attribute
Inheritance
CommandCatalogAttribute
Inherited Members
Extension Methods

Constructors

CommandCatalogAttribute(CommandCategory)

Places the command under category in the catalog.

public CommandCatalogAttribute(CommandCategory category)

Parameters

category CommandCategory

Catalog category the command is listed under.

Properties

Aliases

Extra search keywords for catalog search boxes. Each entry is a vocabulary key (an English default word, localized through CultureTextAttribute declarations the way title words are). Declare the terms users search by that appear in neither the display name nor the kind key — e.g. RecordMeshedGeomCommand aliases Read / Write, its action modes. Null when the command needs none.

public string[] Aliases { get; set; }

Property Value

string[]

Category

Catalog category the command is listed under.

public CommandCategory Category { get; }

Property Value

CommandCategory

Kind

Wire kind key web APIs use for the command type. Default (null): the class name without the Command suffix, lower-cased (e.g. NcFileCommandncfile). Set explicitly only to keep a historical key alive.

public string Kind { get; set; }

Property Value

string

Order

Sort key within the category (ascending; ties sort by display name).

public int Order { get; set; }

Property Value

int

Methods

GetKind(Type)

The effective wire kind key of commandType: the attribute's explicit Kind when set, otherwise the default derivation described on Kind. Works for un-attributed types too (derivation only).

public static string GetKind(Type commandType)

Parameters

commandType Type

The session command type.

Returns

string

The wire kind key.