C# Class RohBot.Command

Afficher le fichier Open project: Rohansi/RohBot Class Usage Examples

Méthodes publiques

Méthode Description
Format ( CommandTarget target, string type ) : string

Return a parameter format string. '-' is a short parameter and ']' uses remaining space. Returns null if it can not handle type. Target and type can be ignored if this is not a default handler. Examples: "" = No parameters "-" = One short parameter (word or text enclosed in double quotes) "]" = One parameter containing all text after Type "--]" = Two short parameters and one parameter containing the leftovers

Handle ( CommandTarget target, string message, string commandHeader ) : bool
Handle ( CommandTarget target, string type, string parameters ) : void

Called when somebody uses this command. Type can be ignored if this is not a default handler.

Private Methods

Méthode Description
Command ( ) : System
ReadRemaining ( StringReader reader ) : string
ReadWord ( StringReader reader ) : string
SkipWhiteSpace ( StringReader reader ) : void

Method Details

Format() public abstract méthode

Return a parameter format string. '-' is a short parameter and ']' uses remaining space. Returns null if it can not handle type. Target and type can be ignored if this is not a default handler. Examples: "" = No parameters "-" = One short parameter (word or text enclosed in double quotes) "]" = One parameter containing all text after Type "--]" = Two short parameters and one parameter containing the leftovers
public abstract Format ( CommandTarget target, string type ) : string
target CommandTarget
type string
Résultat string

Handle() public static méthode

public static Handle ( CommandTarget target, string message, string commandHeader ) : bool
target CommandTarget
message string
commandHeader string
Résultat bool

Handle() public abstract méthode

Called when somebody uses this command. Type can be ignored if this is not a default handler.
public abstract Handle ( CommandTarget target, string type, string parameters ) : void
target CommandTarget
type string
parameters string
Résultat void