Browse Source

refactor.

undefined
Savorboard 7 years ago
parent
commit
4eb1c60f0c
4 changed files with 7 additions and 7 deletions
  1. +2
    -2
      src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs
  2. +2
    -2
      src/DotNetCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs
  3. +1
    -1
      src/DotNetCore.CAP.PostgreSql/PostgreSqlStorageConnection.cs
  4. +2
    -2
      src/DotNetCore.CAP.SqlServer/CAP.SqlServerCapOptionsExtension.cs

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

@@ -20,9 +20,9 @@ namespace DotNetCore.CAP
{
services.AddSingleton<CapDatabaseStorageMarkerService>();
services.AddSingleton<IStorage, MySqlStorage>();
services.AddScoped<IStorageConnection, MySqlStorageConnection>();
services.AddSingleton<IStorageConnection, MySqlStorageConnection>();
services.AddScoped<ICapPublisher, CapPublisher>();
services.AddTransient<ICallbackPublisher, CapPublisher>();
services.AddScoped<ICallbackPublisher, CapPublisher>();
services.AddTransient<IAdditionalProcessor, DefaultAdditionalProcessor>();

var mysqlOptions = new MySqlOptions();


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

@@ -20,9 +20,9 @@ namespace DotNetCore.CAP
{
services.AddSingleton<CapDatabaseStorageMarkerService>();
services.AddSingleton<IStorage, PostgreSqlStorage>();
services.AddScoped<IStorageConnection, PostgreSqlStorageConnection>();
services.AddSingleton<IStorageConnection, PostgreSqlStorageConnection>();
services.AddScoped<ICapPublisher, CapPublisher>();
services.AddTransient<ICallbackPublisher, CapPublisher>();
services.AddScoped<ICallbackPublisher, CapPublisher>();
services.AddTransient<IAdditionalProcessor, DefaultAdditionalProcessor>();

var postgreSqlOptions = new PostgreSqlOptions();


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

@@ -13,7 +13,7 @@ namespace DotNetCore.CAP.PostgreSql
{
private readonly CapOptions _capOptions;

public PostgreSqlStorageConnection(PostgreSqlOptions options,CapOptions capOptions)
public PostgreSqlStorageConnection(PostgreSqlOptions options, CapOptions capOptions)
{
_capOptions = capOptions;
Options = options;


+ 2
- 2
src/DotNetCore.CAP.SqlServer/CAP.SqlServerCapOptionsExtension.cs View File

@@ -21,8 +21,8 @@ namespace DotNetCore.CAP
services.AddSingleton<CapDatabaseStorageMarkerService>();
services.AddSingleton<IStorage, SqlServerStorage>();
services.AddSingleton<IStorageConnection, SqlServerStorageConnection>();
services.AddTransient<ICapPublisher, CapPublisher>();
services.AddTransient<ICallbackPublisher, CapPublisher>();
services.AddScoped<ICapPublisher, CapPublisher>();
services.AddScoped<ICallbackPublisher, CapPublisher>();
services.AddTransient<IAdditionalProcessor, DefaultAdditionalProcessor>();
AddSqlServerOptions(services);
}


Loading…
Cancel
Save