Skip to main content

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.

Constructors​

MemberWhat it is
protected RequirementAttribute()Creates a RequirementAttribute with default values.

Methods​

MemberWhat 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: