Table of Contents

Class ConsoleCommandAttribute

Namespace
Nautilus.Commands
Assembly
Nautilus.dll
Attribute used to signify the decorated method should be called in response to a console command.

Decorated method must be both public and static.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class ConsoleCommandAttribute : Attribute, _Attribute
Inheritance
ConsoleCommandAttribute
Implements
Inherited Members
Extension Methods

Remarks

The command can take parameters and will respect optional parameters as outlined in the method's signature.
Supported parameter types: string, bool, int, float, double.

If the method has a return type, it will be printed to both the screen and the log.

Constructors

ConsoleCommandAttribute(string)

Signifies the decorated method should be called when the given command is entered in the dev console.

Decorated method must be both public and static.

public ConsoleCommandAttribute(string command)

Parameters

command string
The unique, case-insensitive command that when entered into the dev console will call the decorated method.

Remarks

The command can take parameters and will respect optional parameters as outlined in the method's signature.
Supported parameter types: string, bool, int, float, double.

If the method has a return type, it will be printed to both the screen and the log.

See Also

Properties

Command

The unique, case-insensitive command that when entered, will call the decorated method.
public string Command { get; }

Property Value

string

See Also