Commit 0e52aa1f authored by yangxiaodong's avatar yangxiaodong

modify cap subscribe method register to DI with transient.

parent 3237737d
...@@ -78,7 +78,7 @@ namespace Microsoft.Extensions.DependencyInjection ...@@ -78,7 +78,7 @@ namespace Microsoft.Extensions.DependencyInjection
foreach (var service in consumerListenerServices) foreach (var service in consumerListenerServices)
{ {
services.AddSingleton(service.Key, service.Value); services.AddTransient(service.Key, service.Value);
} }
var types = Assembly.GetEntryAssembly().ExportedTypes; var types = Assembly.GetEntryAssembly().ExportedTypes;
...@@ -86,7 +86,7 @@ namespace Microsoft.Extensions.DependencyInjection ...@@ -86,7 +86,7 @@ namespace Microsoft.Extensions.DependencyInjection
{ {
if (Helper.IsController(type.GetTypeInfo())) if (Helper.IsController(type.GetTypeInfo()))
{ {
services.AddSingleton(typeof(object), type); services.AddTransient(typeof(object), type);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment