Table of Contents

Class CommandAttribute

Namespace
Core.Commands
Assembly
Core.dll

Marks a SimpleCommand class for auto-discovery and factory generation. Replaces the need for separate ICommandFactory + CommandMetadataAttribute.

Usage: [Command("my_command", Description = "Does something")] public class MyCommand : SimpleCommand { ... }

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class CommandAttribute : Attribute
Inheritance
object
Attribute
CommandAttribute

Constructors

CommandAttribute(string)

public CommandAttribute(string name)

Parameters

name string

Properties

Aliases

Aliases for the command (e.g., ["gold", "ag"])

public string[] Aliases { get; set; }

Property Value

string[]

Description

Description of what the command does

public string Description { get; set; }

Property Value

string

Examples

Example invocations

public string[] Examples { get; set; }

Property Value

string[]

Name

Primary command name (e.g., "add_gold")

public string Name { get; }

Property Value

string

Usage

Usage example. Auto-generated from [Arg] attributes if not provided.

public string Usage { get; set; }

Property Value

string