Przeglądaj źródła

modify cap subscribe method register to DI with transient.

master
yangxiaodong 7 lat temu
rodzic
commit
0e52aa1fb2
1 zmienionych plików z 2 dodań i 2 usunięć
  1. +2
    -2
      src/DotNetCore.CAP/CAP.ServiceCollectionExtensions.cs

+ 2
- 2
src/DotNetCore.CAP/CAP.ServiceCollectionExtensions.cs Wyświetl plik

@@ -78,7 +78,7 @@ namespace Microsoft.Extensions.DependencyInjection

foreach (var service in consumerListenerServices)
{
services.AddSingleton(service.Key, service.Value);
services.AddTransient(service.Key, service.Value);
}

var types = Assembly.GetEntryAssembly().ExportedTypes;
@@ -86,7 +86,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
if (Helper.IsController(type.GetTypeInfo()))
{
services.AddSingleton(typeof(object), type);
services.AddTransient(typeof(object), type);
}
}
}


Ładowanie…
Anuluj
Zapisz