Table of Contents

Interface ICommandArgumentParser

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public interface ICommandArgumentParser
Extension Methods

Properties

ArgCount

Return -1 to ignore arg count checking

int ArgCount { get; }

Property Value

int

ArgumentName

string ArgumentName { get; }

Property Value

string

IsMandatoryArg

bool IsMandatoryArg { get; }

Property Value

bool

IsMissing

bool IsMissing { get; set; }

Property Value

bool

LastErrorMessage

string LastErrorMessage { get; }

Property Value

string

Methods

GetSyntax()

string GetSyntax()

Returns

string

GetSyntaxExplanation(string)

string GetSyntaxExplanation(string indent)

Parameters

indent string

Returns

string

GetValidRange(CmdArgs)

string[] GetValidRange(CmdArgs args)

Parameters

args CmdArgs

Returns

string[]

GetValue()

object GetValue()

Returns

object

PreProcess(TextCommandCallingArgs)

void PreProcess(TextCommandCallingArgs args)

Parameters

args TextCommandCallingArgs

SetValue(object)

Used by the async system

void SetValue(object data)

Parameters

data object

TryProcess(TextCommandCallingArgs, Action<AsyncParseResults>)

Parse the args.

EnumParseResult TryProcess(TextCommandCallingArgs args, Action<AsyncParseResults> onReady = null)

Parameters

args TextCommandCallingArgs
onReady Action<AsyncParseResults>

Only needs to be called when returning Deferred as parseresult

Returns

EnumParseResult