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