1
0
mirror of synced 2024-11-16 14:53:50 +00:00

Fixed warning SimpleInjector: RegisterSingleton(instance) is obsolete -> use RegisterInstance

- please review -
This commit is contained in:
Hans Mulder 2018-06-11 09:59:16 +02:00
parent 93e19f842a
commit 6f3766aed4

View File

@ -45,7 +45,7 @@ namespace Tapeti.SimpleInjector
public void RegisterDefaultSingleton<TService>(TService instance) where TService : class public void RegisterDefaultSingleton<TService>(TService instance) where TService : class
{ {
if (CanRegisterDefault<TService>()) if (CanRegisterDefault<TService>())
container.RegisterSingleton(instance); container.RegisterInstance(instance);
} }
public void RegisterDefaultSingleton<TService>(Func<TService> factory) where TService : class public void RegisterDefaultSingleton<TService>(Func<TService> factory) where TService : class