RequirementAttribute
An abstract class in Root.Township, Alta.Console.
Base attribute for a condition a console command (method or whole module class) needs before it can run. Subclasses override Check.
- Listed in Console, logging and analytics
- Inherits or implements
Attribute - Derived types
ClientOnlyAttribute,DevOnlyAttribute,EditorOnlyAttribute,GroupPermissionAttribute,LoggedInOnlyAttribute,NonSimpleServerAttribute,NotAllowedInRemoteAttribute,PlayOnlyAttribute,ServerOnlyAttribute,WithGroupPermissionsOnlyAttribute,WithPermissionOnlyAttribute - Attributes
Usage
Constructors
| Member | What it is |
|---|---|
protected RequirementAttribute() | Creates a RequirementAttribute with default values. |
Methods
| Member | What it is |
|---|---|
virtual bool Check() | Returns whether the requirement is met. The default is always true; the context overload just calls the plain one unless overridden. |
virtual bool Check(CommandContext context) | Returns whether the requirement is met. The default is always true; the context overload just calls the plain one unless overridden. |
Used in
Members of other types that take, return or hold a RequirementAttribute: