public SingleCallServiceRegistration <TService> RegisterSingleCall <TService>(Func <TService> FactoryMethod) where TService : class { var service_interface = typeof(TService); lock (_SyncRoot) { var registration = new SingleCallServiceRegistration <TService>(this, service_interface, FactoryMethod); _Services[service_interface] = registration; return(registration); } }
public SingleCallServiceRegistration <TService> RegisterSingleCall <TService>() where TService : class { var service_type = typeof(TService); lock (_SyncRoot) { var registration = new SingleCallServiceRegistration <TService>(this, service_type); _Services[service_type] = registration; return(registration); } }