public IServiceCollection GetServiceDescriptors() { IServiceCollection serviceDescriptors = new ServiceCollection(); serviceDescriptors.AddTransient <ILogger <Kyameru.Route> >(sp => { return(this.logger.Object); }); Inflator inflator = new Inflator(); inflator.RegisterFrom(serviceDescriptors); inflator.RegisterTo(serviceDescriptors); return(serviceDescriptors); }
private IServiceCollection GetServiceDescriptors(bool tryFrom = false) { IServiceCollection serviceDescriptors = new ServiceCollection(); serviceDescriptors.AddTransient <ILogger <Kyameru.Route> >(sp => { return(this.logger.Object); }); Inflator inflator = new Inflator(); inflator.RegisterTo(serviceDescriptors); if (tryFrom) { inflator.RegisterFrom(serviceDescriptors); } return(serviceDescriptors); }