BotSharp/src/Plugins/BotSharp.Plugin.SqlDriver/SqlDriverPlugin.cs

22 lines
836 B
C#
Raw Normal View History

2024-01-18 11:30:28 +00:00
namespace BotSharp.Plugin.SqlDriver;
2024-01-13 21:17:40 +00:00
2024-01-18 11:30:28 +00:00
public class SqlDriverPlugin : IBotSharpPlugin
2024-01-13 21:17:40 +00:00
{
2024-01-18 11:30:28 +00:00
public string Id => "da7b6f7a-b1f0-455a-9939-ad2d493e929e";
public string Name => "SQL Driver";
2024-02-19 22:55:41 +00:00
public string Description => "Convert the user requirements into corresponding SQL statements";
public string IconUrl => "https://uxwing.com/wp-content/themes/uxwing/download/file-and-folder-type/sql-icon.png";
2024-01-13 21:17:40 +00:00
public void RegisterDI(IServiceCollection services, IConfiguration config)
{
2024-02-19 22:55:41 +00:00
services.AddScoped(provider =>
2024-01-13 21:17:40 +00:00
{
2024-02-19 22:55:41 +00:00
var settingService = provider.GetRequiredService<ISettingService>();
return settingService.Bind<SqlDriverSetting>("SqlDriver");
2024-01-13 21:17:40 +00:00
});
2024-02-19 22:55:41 +00:00
services.AddScoped<SqlDriverService>();
services.AddScoped<IKnowledgeHook, SqlDriverKnowledgeHook>();
2024-01-13 21:17:40 +00:00
}
}