Search Results for

    Show / Hide Table of Contents

    Class CommandParser

    Inheritance
    Object
    CommandParser
    Namespace: Clavusaurus.Cosmos
    Assembly: cs.temp.dll.dll
    Syntax
    public class CommandParser

    Fields

    INVALID_KEYWORD_CHARS

    Declaration
    public static readonly List<char> INVALID_KEYWORD_CHARS
    Field Value
    Type Description
    List<Char>

    INVALID_VALUE_CHARS

    Declaration
    public static readonly List<char> INVALID_VALUE_CHARS
    Field Value
    Type Description
    List<Char>

    SUPPORTED_BOOLEAN_VALUES

    Declaration
    public static readonly List<string> SUPPORTED_BOOLEAN_VALUES
    Field Value
    Type Description
    List<String>

    Methods

    AddNewCommand(CommandDefinition)

    Declaration
    public bool AddNewCommand(CommandDefinition cmdDef)
    Parameters
    Type Name Description
    CommandDefinition cmdDef
    Returns
    Type Description
    Boolean

    AddNewCommandCategory(String)

    Declaration
    public int AddNewCommandCategory(string name)
    Parameters
    Type Name Description
    String name
    Returns
    Type Description
    Int32

    AddUser(UserDefinition)

    Declaration
    public bool AddUser(UserDefinition user)
    Parameters
    Type Name Description
    UserDefinition user
    Returns
    Type Description
    Boolean

    Deserialize(Byte[])

    Deserialize byte array to Command

    Declaration
    public Command Deserialize(byte[] networkBytes)
    Parameters
    Type Name Description
    Byte[] networkBytes
    Returns
    Type Description
    Command

    GetCommandDefinitionById(Int32)

    Declaration
    public CommandDefinition GetCommandDefinitionById(int id)
    Parameters
    Type Name Description
    Int32 id
    Returns
    Type Description
    CommandDefinition

    GetCommandIdByKeyword(String)

    Declaration
    public int GetCommandIdByKeyword(string keyword)
    Parameters
    Type Name Description
    String keyword
    Returns
    Type Description
    Int32

    GetCommandKeywordById(Int32)

    Declaration
    public string GetCommandKeywordById(int id)
    Parameters
    Type Name Description
    Int32 id
    Returns
    Type Description
    String

    GetCommandSplit(String)

    Declaration
    public static string[] GetCommandSplit(string rawCmdString)
    Parameters
    Type Name Description
    String rawCmdString
    Returns
    Type Description
    String[]

    GetNumCommands()

    Declaration
    public int GetNumCommands()
    Returns
    Type Description
    Int32

    GetParameterSplit(String)

    Declaration
    public static string[] GetParameterSplit(string rawParamString)
    Parameters
    Type Name Description
    String rawParamString
    Returns
    Type Description
    String[]

    IsValidCommandConfig(CosmosConsoleConfig)

    Declaration
    public static bool IsValidCommandConfig(CosmosConsoleConfig config)
    Parameters
    Type Name Description
    CosmosConsoleConfig config
    Returns
    Type Description
    Boolean

    IsValidKeyword(String)

    Declaration
    public static bool IsValidKeyword(string keyword)
    Parameters
    Type Name Description
    String keyword
    Returns
    Type Description
    Boolean

    IsValidParameterValue(String)

    Declaration
    public static bool IsValidParameterValue(string value)
    Parameters
    Type Name Description
    String value
    Returns
    Type Description
    Boolean

    IsValidPassword(String)

    Declaration
    public static bool IsValidPassword(string password)
    Parameters
    Type Name Description
    String password
    Returns
    Type Description
    Boolean

    Parse(String)

    Parses input string. Splits on space character, except when enclosed in quotes. First word is considered the command keyword.

    Declaration
    public Command Parse(string str)
    Parameters
    Type Name Description
    String str
    Returns
    Type Description
    Command

    RemoveCommand(String)

    Declaration
    public bool RemoveCommand(string keyword)
    Parameters
    Type Name Description
    String keyword
    Returns
    Type Description
    Boolean

    RemoveUser(String)

    Declaration
    public bool RemoveUser(string username)
    Parameters
    Type Name Description
    String username
    Returns
    Type Description
    Boolean

    Serialize(Command)

    Serialize Command to byte array

    Declaration
    public byte[] Serialize(Command command)
    Parameters
    Type Name Description
    Command command
    Returns
    Type Description
    Byte[]

    SetCommandEnabled(String, Boolean)

    Declaration
    public bool SetCommandEnabled(string commandKeyword, bool enabled)
    Parameters
    Type Name Description
    String commandKeyword
    Boolean enabled
    Returns
    Type Description
    Boolean

    SetCommandParameterValues(String, String, List<String>)

    Declaration
    public bool SetCommandParameterValues(string commandKeyword, string parameterKey, List<string> values)
    Parameters
    Type Name Description
    String commandKeyword
    String parameterKey
    List<String> values
    Returns
    Type Description
    Boolean

    SetUserCommandAccess(String, String, Boolean)

    Declaration
    public bool SetUserCommandAccess(string username, string commandKeyword, bool allowAccess)
    Parameters
    Type Name Description
    String username
    String commandKeyword
    Boolean allowAccess
    Returns
    Type Description
    Boolean

    SetUserCommandsInCategoryAccess(String, String, Boolean)

    Declaration
    public bool SetUserCommandsInCategoryAccess(string username, string category, bool allowAccess)
    Parameters
    Type Name Description
    String username
    String category
    Boolean allowAccess
    Returns
    Type Description
    Boolean

    ValidateParameters(Command)

    Declaration
    public void ValidateParameters(Command command)
    Parameters
    Type Name Description
    Command command
    ☀
    ☾
    In This Article
    Back to top
    © Clavusaurus Game Software
    ☀
    ☾