C# Класс SharpMod.Command

A class for handling commands send by the players
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Command ( string arguments ) : System

Constructor of the class

Execute ( Player player ) : void
FakeCall ( Player p ) : void

Emulates a player calling a command.

ToString ( ) : string

A string representation of the class. Returns a online command string, which could be written into the console.

Защищенные методы

Метод Описание
OnFailure ( Player player ) : void
OnFailure ( int userid ) : void
OnFailure ( int userid, Exception exception ) : void
OnFailure ( int userid, string errorMessage ) : void
OnSuccess ( Player player ) : void
OnSuccess ( int userid ) : void
Write ( Player player, string text ) : void
WriteLine ( Player player, string text ) : void

Приватные методы

Метод Описание
Escape ( string text ) : string

Описание методов

Command() публичный Метод

Constructor of the class
public Command ( string arguments ) : System
arguments string /// A managed array with the arguments ///
Результат System

Execute() публичный Метод

public Execute ( Player player ) : void
player Player
Результат void

FakeCall() публичный Метод

Emulates a player calling a command.
public FakeCall ( Player p ) : void
p Player /// Instance of the player ///
Результат void

OnFailure() защищенный Метод

protected OnFailure ( Player player ) : void
player Player
Результат void

OnFailure() защищенный Метод

protected OnFailure ( int userid ) : void
userid int
Результат void

OnFailure() защищенный Метод

protected OnFailure ( int userid, Exception exception ) : void
userid int
exception System.Exception
Результат void

OnFailure() защищенный Метод

protected OnFailure ( int userid, string errorMessage ) : void
userid int
errorMessage string
Результат void

OnSuccess() защищенный Метод

protected OnSuccess ( Player player ) : void
player Player
Результат void

OnSuccess() защищенный Метод

protected OnSuccess ( int userid ) : void
userid int
Результат void

ToString() публичный Метод

A string representation of the class. Returns a online command string, which could be written into the console.
public ToString ( ) : string
Результат string

Write() защищенный статический Метод

protected static Write ( Player player, string text ) : void
player Player
text string
Результат void

WriteLine() защищенный статический Метод

protected static WriteLine ( Player player, string text ) : void
player Player
text string
Результат void