Class ArgumentParserBase
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public abstract class ArgumentParserBase : ICommandArgumentParser
- Inheritance
-
ArgumentParserBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ArgumentParserBase(string, bool)
protected ArgumentParserBase(string argName, bool isMandatoryArg)
Parameters
Fields
argCount
protected int argCount
Field Value
argName
protected string argName
Field Value
isMandatoryArg
protected bool isMandatoryArg
Field Value
lastErrorMessage
protected string lastErrorMessage
Field Value
Properties
ArgCount
Return -1 to ignore arg count checking
public int ArgCount { get; }
Property Value
ArgumentName
public string ArgumentName { get; }
Property Value
IsMandatoryArg
public bool IsMandatoryArg { get; }
Property Value
IsMissing
public bool IsMissing { get; set; }
Property Value
LastErrorMessage
public string LastErrorMessage { get; }
Property Value
Methods
GetLastError()
public virtual string GetLastError()
Returns
GetSyntax()
public virtual string GetSyntax()
Returns
GetSyntaxExplanation(string)
public virtual string GetSyntaxExplanation(string indent)
Parameters
indent
string
Returns
GetSyntaxUnformatted()
public virtual string GetSyntaxUnformatted()
Returns
GetValidRange(CmdArgs)
public virtual string[] GetValidRange(CmdArgs args)
Parameters
args
CmdArgs
Returns
- string[]
GetValue()
public abstract object GetValue()
Returns
PreProcess(TextCommandCallingArgs)
public virtual void PreProcess(TextCommandCallingArgs args)
Parameters
SetValue(object)
Used by the async system
public abstract void SetValue(object data)
Parameters
data
object
TryProcess(TextCommandCallingArgs, Action<AsyncParseResults>)
Parse the args.
public abstract EnumParseResult TryProcess(TextCommandCallingArgs args, Action<AsyncParseResults> onReady = null)
Parameters
args
TextCommandCallingArgsonReady
Action<AsyncParseResults>Only needs to be called when returning Deferred as parseresult
Returns
parseSubArgs(string)
protected Dictionary<string, string> parseSubArgs(string strargs)
Parameters
strargs
string