Browse Source

add ICallbackPublisher to DI

master
yangxiaodong 7 years ago
parent
commit
fe2dc1ac85
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs
  2. +1
    -0
      src/DotNetCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs

+ 1
- 0
src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs View File

@@ -21,6 +21,7 @@ namespace DotNetCore.CAP
services.AddSingleton<IStorage, MySqlStorage>();
services.AddScoped<IStorageConnection, MySqlStorageConnection>();
services.AddScoped<ICapPublisher, CapPublisher>();
services.AddTransient<ICallbackPublisher, CapPublisher>();
services.AddTransient<IAdditionalProcessor, DefaultAdditionalProcessor>();

var mysqlOptions = new MySqlOptions();


+ 1
- 0
src/DotNetCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs View File

@@ -21,6 +21,7 @@ namespace DotNetCore.CAP
services.AddSingleton<IStorage, PostgreSqlStorage>();
services.AddScoped<IStorageConnection, PostgreSqlStorageConnection>();
services.AddScoped<ICapPublisher, CapPublisher>();
services.AddTransient<ICallbackPublisher, CapPublisher>();
services.AddTransient<IAdditionalProcessor, DefaultAdditionalProcessor>();

var postgreSqlOptions = new PostgreSqlOptions();


Loading…
Cancel
Save