Add commenting for parsers
rename IW4*Parser to Base*Parser
This commit is contained in:
@ -2,12 +2,33 @@
|
||||
{
|
||||
public interface IEventParserConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// stores the fs_game directory (this folder may vary between different clients)
|
||||
/// </summary>
|
||||
string GameDirectory { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex information for a say event printed in the game log
|
||||
/// </summary>
|
||||
ParserRegex Say { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex information for a join event printed in the game log
|
||||
/// </summary>
|
||||
ParserRegex Join { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex information for a quit event printed in the game log
|
||||
/// </summary>
|
||||
ParserRegex Quit { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex information for a kill event printed in the game log
|
||||
/// </summary>
|
||||
ParserRegex Kill { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex information for a damage event printed in the game log
|
||||
/// </summary>
|
||||
ParserRegex Damage { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex information for an action event printed in the game log
|
||||
/// </summary>
|
||||
ParserRegex Action { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -9,11 +9,47 @@ namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
public interface IRConParser
|
||||
{
|
||||
/// <summary>
|
||||
/// retrieves the value of a given DVAR
|
||||
/// </summary>
|
||||
/// <typeparam name="T">type of DVAR expected (string, int, float etc...)</typeparam>
|
||||
/// <param name="connection">RCon connection to retrieve with</param>
|
||||
/// <param name="dvarName">name of DVAR</param>
|
||||
/// <returns></returns>
|
||||
Task<Dvar<T>> GetDvarAsync<T>(Connection connection, string dvarName);
|
||||
|
||||
/// <summary>
|
||||
/// set value of DVAR by name
|
||||
/// </summary>
|
||||
/// <param name="connection">RCon connection to use</param>
|
||||
/// <param name="dvarName">name of DVAR to set</param>
|
||||
/// <param name="dvarValue">value to set DVAR to</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> SetDvarAsync(Connection connection, string dvarName, object dvarValue);
|
||||
|
||||
/// <summary>
|
||||
/// executes a console command on the server
|
||||
/// </summary>
|
||||
/// <param name="connection">RCon connection to use</param>
|
||||
/// <param name="command">console command to execute</param>
|
||||
/// <returns></returns>
|
||||
Task<string[]> ExecuteCommandAsync(Connection connection, string command);
|
||||
|
||||
/// <summary>
|
||||
/// get the list of connected clients from status response
|
||||
/// </summary>
|
||||
/// <param name="connection">RCon connection to use</param>
|
||||
/// <returns></returns>
|
||||
Task<List<EFClient>> GetStatusAsync(Connection connection);
|
||||
|
||||
/// <summary>
|
||||
/// stores the RCon configuration
|
||||
/// </summary>
|
||||
IRConParserConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// stores the game/client specific version (usually the value of the "version" DVAR)
|
||||
/// </summary>
|
||||
string Version { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,21 @@ namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
public interface IRConParserConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// stores the command format for console commands
|
||||
/// </summary>
|
||||
CommandPrefix CommandPrefixes { get; set; }
|
||||
/// <summary>
|
||||
/// optionally stores the game name type
|
||||
/// </summary>
|
||||
Server.Game GameName { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex info for parsing get status response
|
||||
/// </summary>
|
||||
ParserRegex Status { get; set; }
|
||||
/// <summary>
|
||||
/// stores the regex info for parsing get DVAR responses
|
||||
/// </summary>
|
||||
ParserRegex Dvar { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user