BotSharp/src/Plugins/BotSharp.Plugin.ExcelHandler/Hooks/ExcelHandlerHook.cs

26 lines
655 B
C#
Raw Normal View History

2024-09-26 20:34:16 +00:00
namespace BotSharp.Plugin.ExcelHandler.Hooks;
public class ExcelHandlerHook : AgentHookBase, IAgentHook
{
private const string HANDLER_EXCEL = "handle_excel_request";
public override string SelfId => string.Empty;
public ExcelHandlerHook(IServiceProvider services, AgentSettings settings) : base(services, settings)
{
}
public override void OnAgentLoaded(Agent agent)
{
2024-11-20 16:13:40 +00:00
var utilityLoad = new AgentUtility
2024-09-26 20:34:16 +00:00
{
2024-11-20 16:13:40 +00:00
Name = UtilityName.ExcelHandler,
2024-11-20 23:10:38 +00:00
Functions = [new(HANDLER_EXCEL)],
Templates = [new($"{HANDLER_EXCEL}.fn")]
2024-11-20 08:24:26 +00:00
};
2024-09-26 20:34:16 +00:00
2024-11-20 08:24:26 +00:00
base.OnAgentLoaded(agent);
2024-09-26 20:34:16 +00:00
}
}