[This is preliminary documentation and is subject to change.]
A text scanner that aids parsing chat commands and their arguments.
Breaks up a message into tokens at spaces. Treats quoted strings as whole tokens.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.2.4 (0.6.2.4)
Syntax
| C# |
public sealed class Command : ICloneable
Members
| All Members | Constructors | Fields | Properties | Methods |
| Member | Description | |
|---|---|---|
| Command(String) | Creates a command from a raw message. | |
| Command(Command) | Creates a copy of an existing command. | |
| Clone()()()() | Creates a copy of this command.
Use the copy constructor instead of this, if possible. | |
| Count | Counts the total number of arguments.
Does not modify the offset. | |
| CountRemaining | Counts the number of arguments left in this command.
Does not modify the offset. | |
| Descriptor | ||
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| HasInt | Checks whether there there is an int argument available.
Does not modify the offset. | |
| HasNext | Checks whether there is another argument available.
Does not modify the offset. | |
| IsConfirmed | ||
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Name | ||
| Next()()()() | Returns the next command argument.
A single "argument" is either a word that ends with whitespace,
or several words in double quotes (""). | |
| NextAll()()()() | Returns the rest of command's text, from current offset to the end of string.
If there is nothing to return (i.e. if string ends at the current offset),
returns empty string. | |
| NextBlock(Player) | ||
| NextBlockWithParam(Player, Int32%) | ||
| NextInt(Int32%) | Returns the next command argument, parsed as an integer. | |
| Offset | ||
| RawMessage | ||
| Rewind()()()() | Resets the argument offset.
After calling Rewind, arguments can be read from the beginning again. | |
| ToString()()()() | (Overrides Object..::..ToString()()()().) |