public void Init(IPluginInitContext context) { if (_options == null) { throw new Exception("注入配置失败"); } context.ServiceCollection.AddSingleton <TestPluginEService>(); }
public void Init(IPluginInitContext context) { }
public void Init(IPluginInitContext context) { context.ServiceCollection.AddSingleton <TestDIClass>(); }
public void Init(IPluginInitContext context) { // 注入服务 //context.ServiceCollection.TryAddScoped<ICustomerService>(); Console.WriteLine($"Init 插件配置:{Options.TestConfig}"); }