Table of Contents

Struct PluginCommand

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

One invocation of a plugin command.

public readonly record struct PluginCommand : IEquatable<PluginCommand>
Implements
Inherited Members

Constructors

PluginCommand(string, string, string)

One invocation of a plugin command.

public PluginCommand(string Verb, string Arguments, string RawText)

Parameters

Verb string

The command word the player typed, without its leading slash.

Arguments string

Everything after the verb, as typed.

RawText string

The whole line as the player typed it.

Properties

Arguments

Everything after the verb, as typed.

public string Arguments { get; init; }

Property Value

string

RawText

The whole line as the player typed it.

public string RawText { get; init; }

Property Value

string

Verb

The command word the player typed, without its leading slash.

public string Verb { get; init; }

Property Value

string

Methods

ParseArguments()

Parses shell-like arguments, preserving quoted multi-word values.

public IReadOnlyList<string> ParseArguments()

Returns

IReadOnlyList<string>

The arguments in order; empty when there are none.

Exceptions

FormatException

A quote is opened and never closed.