Class CommandsHandlerConstructorAttribute
Marks handler's constructor as a constructor for Commands System.
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = true, Inherited = false)]
public class CommandsHandlerConstructorAttribute : Attribute
Remarks
By default, Commands System will only look at public constructors of the handler, on order depending on parameters count, from highest to lowest. This attribute allows for marking a specific constructor to be used. Marked constructor can be private.
If multiple constructors are marked, Priority is used. Constructor with higher priority will always be tested first. If multiple constructors have the same priority, they're attempted in order depending on parameters count, from highest to lowest.
Constructors
| Improve this Doc View SourceCommandsHandlerConstructorAttribute()
Creates a new CommandHandlerConstructor attribute.
Declaration
public CommandsHandlerConstructorAttribute()
Remarks
See CommandsHandlerConstructorAttribute for more information about handler constructor priorities.
CommandsHandlerConstructorAttribute(Int32)
Creates a new CommandHandlerConstructor attribute.
Declaration
public CommandsHandlerConstructorAttribute(int priority)
Parameters
Type | Name | Description |
---|---|---|
Int32 | priority | Constructor's priority. |
Remarks
See CommandsHandlerConstructorAttribute for more information about handler constructor priorities.
Properties
| Improve this Doc View SourcePriority
Constructor's priority.
Declaration
public int Priority { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
See CommandsHandlerConstructorAttribute for more information about handler constructor priorities.