internal static TService GetInstance <TService, TImplementation>( ScopedRegistration <TService, TImplementation> registration, Scope scope) where TImplementation : class, TService where TService : class { if (scope == null) { return(GetScopelessInstance(registration)); } lock (scope.syncRoot) { return(scope.GetInstance(registration)); } }
public void UsingSimpleInjector() { var instance = simpleInjectorScope.GetInstance <DisposableFoo>(); }