1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-09 23:00:57 -05:00

add a bit more logged for when live radar fail to update

update killhouse map offsets (it's still wrong though)
This commit is contained in:
RaidMax
2019-07-29 12:08:25 -05:00
parent e3802388af
commit 984573c902
10 changed files with 97 additions and 22 deletions

View File

@ -5,8 +5,17 @@ using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
/// represents an invokable middleware action
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IMiddlewareAction<T>
{
/// <summary>
/// action to execute when the middleware action is invoked
/// </summary>
/// <param name="original"></param>
/// <returns>modified original action type instance</returns>
Task<T> Invoke(T original);
}
}

View File

@ -5,9 +5,27 @@ using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
/// used to handle middleware actions registered from arbitrary assemblies
/// </summary>
public interface IMiddlewareActionHandler
{
/// <summary>
/// registers an action with the middleware handler
/// </summary>
/// <typeparam name="T">action return type</typeparam>
/// <param name="actionType">class type of action</param>
/// <param name="action">action to perform</param>
/// <param name="name">optional name to reference the action by</param>
void Register<T>(T actionType, IMiddlewareAction<T> action, string name = null);
/// <summary>
/// executes the given action type or name
/// </summary>
/// <typeparam name="T">action return type</typeparam>
/// <param name="value">instance member to perform the action on</param>
/// <param name="name">optional name to reference the action by</param>
/// <returns></returns>
Task<T> Execute<T>(T value, string name = null);
}
}