public ListaOficialFilmesServiceTest() { IServiceCollection services = new ServiceCollection(); services.AddHttpClient(); services.AddScoped <IConfrontosService, ConfrontosService>(); services.AddSingleton <IListaOficialFilmesService, ListaOficialFilmesService>(); var serviceProvider = services.BuildServiceProvider(); _listaOficialFilmesService = serviceProvider.GetRequiredService <IListaOficialFilmesService>(); }
public ConfrontosService(IListaOficialFilmesService originalListService) { _originalListService = originalListService; }
public ValidateFilmesSelecionadosFilterImplementation(IListaOficialFilmesService listaOficialService) { _listaOficialService = listaOficialService; }
public ConfrontosController(IServiceProvider serviceProvider) { _originalListService = serviceProvider.GetRequiredService <IListaOficialFilmesService>(); _lazyConfrontoBusiness = new Lazy <IConfrontosService>(() => serviceProvider.GetRequiredService <IConfrontosService>()); }