[tweaks and fixes]
reenable tekno support address vagrant thread issue refactor game log reader creation to follow better practices fix bot issues/address how guids are generated for bots/none provided
This commit is contained in:
@ -1,18 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// This class handle games events (from log, manual events, etc)
|
||||
/// handles games events (from log, manual events, etc)
|
||||
/// </summary>
|
||||
public interface IEventHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a game event event to the queue to be processed
|
||||
/// </summary>
|
||||
/// <param name="gameEvent">Game event</param>
|
||||
void AddEvent(GameEvent gameEvent);
|
||||
/// <param name="manager">application manager instance</param>
|
||||
/// <param name="gameEvent">game event</param>
|
||||
void HandleEvent(IManager manager, GameEvent gameEvent);
|
||||
}
|
||||
}
|
||||
|
@ -4,18 +4,17 @@ using System.Threading.Tasks;
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// represents the abtraction of game log reading
|
||||
/// represents the abstraction of game log reading
|
||||
/// </summary>
|
||||
public interface IGameLogReader
|
||||
{
|
||||
/// <summary>
|
||||
/// get new events that have occured since the last poll
|
||||
/// </summary>
|
||||
/// <param name="server"></param>
|
||||
/// <param name="fileSizeDiff"></param>
|
||||
/// <param name="startPosition"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<GameEvent>> ReadEventsFromLog(Server server, long fileSizeDiff, long startPosition);
|
||||
Task<IEnumerable<GameEvent>> ReadEventsFromLog(long fileSizeDiff, long startPosition);
|
||||
|
||||
/// <summary>
|
||||
/// how long the log file is
|
||||
|
18
SharedLibraryCore/Interfaces/IGameLogReaderFactory.cs
Normal file
18
SharedLibraryCore/Interfaces/IGameLogReaderFactory.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// factory interface to create game log readers based on the log file uri
|
||||
/// </summary>
|
||||
public interface IGameLogReaderFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// generates a new game log reader based on the provided Uri
|
||||
/// </summary>
|
||||
/// <param name="logUris">collection of log uri used to generate the log reader</param>
|
||||
/// <param name="eventParser">event parser for the log reader</param>
|
||||
/// <returns></returns>
|
||||
IGameLogReader CreateGameLogReader(Uri[] logUris, IEventParser eventParser);
|
||||
}
|
||||
}
|
@ -24,11 +24,6 @@ namespace SharedLibraryCore.Interfaces
|
||||
AliasService GetAliasService();
|
||||
PenaltyService GetPenaltyService();
|
||||
/// <summary>
|
||||
/// Get the event handlers
|
||||
/// </summary>
|
||||
/// <returns>EventHandler for the manager</returns>
|
||||
IEventHandler GetEventHandler();
|
||||
/// <summary>
|
||||
/// enumerates the registered plugin instances
|
||||
/// </summary>
|
||||
IEnumerable<IPlugin> Plugins { get; }
|
||||
@ -68,7 +63,12 @@ namespace SharedLibraryCore.Interfaces
|
||||
string ExternalIPAddress { get; }
|
||||
CancellationToken CancellationToken { get; }
|
||||
bool IsRestartRequested { get; }
|
||||
//OnServerEventEventHandler OnServerEvent { get; set; }
|
||||
bool IsRunning { get; }
|
||||
Task ExecuteEvent(GameEvent gameEvent);
|
||||
/// <summary>
|
||||
/// queues an event for processing
|
||||
/// </summary>
|
||||
/// <param name="gameEvent">event to be processed</param>
|
||||
void AddEvent(GameEvent gameEvent);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user