跳到主要内容
版本:0.2.1

Struct ConsoleCommand

Namespace: ReadyM.Api.Command
Assembly: ReadyM.Api.dll

public readonly struct ConsoleCommand

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

ConsoleCommand(Delegate, int, int?, IReadOnlyList<ParamInfo>, Type?, bool)

public ConsoleCommand(Delegate handler, int minArgCount, int? maxArgCount, IReadOnlyList<ConsoleCommand.ParamInfo> args, Type? repeatingParam, bool isDebugOnly)

Parameters

handler Delegate

minArgCount int

maxArgCount int?

args IReadOnlyList<ConsoleCommand.ParamInfo>

repeatingParam Type?

isDebugOnly bool

Fields

Handler

public readonly Delegate Handler

Field Value

Delegate

IsDebugOnly

public readonly bool IsDebugOnly

Field Value

bool

MaxArgCount

public readonly int? MaxArgCount

Field Value

int?

MinArgCount

public readonly int MinArgCount

Field Value

int

Parameters

public readonly IReadOnlyList<ConsoleCommand.ParamInfo> Parameters

Field Value

IReadOnlyList<ConsoleCommand.ParamInfo>

RepeatingParam

public readonly Type? RepeatingParam

Field Value

Type?

Methods

Create(Delegate, bool)

public static ConsoleCommand Create(Delegate handler, bool isDebugOnly = false)

Parameters

handler Delegate

isDebugOnly bool

Returns

ConsoleCommand

Invoke(IReadOnlyList<object?>)

public void Invoke(IReadOnlyList<object?> args)

Parameters

args IReadOnlyList<object?>

  • Constructors
    • ConsoleCommand(Delegate, int, int?, IReadOnlyList<ParamInfo>, Type?, bool)
  • Fields
    • Handler
    • IsDebugOnly
    • MaxArgCount
    • MinArgCount
    • Parameters
    • RepeatingParam
  • Methods
    • Create(Delegate, bool)
    • Invoke(IReadOnlyList<object?>)