public DataProviderController( ICountryNamesProvider countryNamesProvider, IFlatProductsProvider flatProductsProvider, IProductCategoriesProvider productCategoriesProvider, IProductsProvider productsProvider, ISalesInfoDataProvider salesInfoDataProvider, ISalesViewerDataProvider salesViewerDataProvider ) { var ct = _cancellationToken = _cts.Token; InitializeEntities(countryNamesProvider, countryNamesProvider.LoadAsync, ct); InitializeEntities(flatProductsProvider, flatProductsProvider.LoadAsync, ct); InitializeEntities(productCategoriesProvider, productCategoriesProvider.GetProductCategoriesAsync, ct); InitializeEntities(productsProvider, productsProvider.LoadAsync, ct); InitializeEntities(salesInfoDataProvider, salesInfoDataProvider.GetSalesAsync, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetChannels, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetCities, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetContacts, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetCustomers, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetPlants, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetProducts, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetRegions, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetSales, ct); InitializeEntities(salesViewerDataProvider, salesViewerDataProvider.GetSectors, ct); _providersReadyToTransfer = Task.WhenAll(_lookup.Values); }
public DataProviderController( IProductsFlatProvider productsFlatProvider, IProductCategoriesProvider productCategoriesProvider, ISalesInfoDataProvider salesInfoDataProvider, INwindDataProvider nwindDataProvider, IIssuesDataProvider issuesDataProvider, IWorldcitiesDataProvider worldcitiesDataProvider ) { var ct = _cancellationToken = _cts.Token; InitializeEntities(productsFlatProvider, productsFlatProvider.GetProductsAsync, ct); InitializeEntities(productCategoriesProvider, productCategoriesProvider.GetProductCategoriesAsync, ct); InitializeEntities(salesInfoDataProvider, salesInfoDataProvider.GetSalesAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetCategoriesAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetCustomersAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetEmployeesAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetInvoicesAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetOrdersAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetOrderDetailsAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetProductsAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetShippersAsync, ct); InitializeEntities(nwindDataProvider, nwindDataProvider.GetSuppliersAsync, ct); InitializeEntities(issuesDataProvider, issuesDataProvider.GetItemsAsync, ct); InitializeEntities(issuesDataProvider, issuesDataProvider.GetProjectsAsync, ct); InitializeEntities(issuesDataProvider, issuesDataProvider.GetUsersAsync, ct); InitializeEntities(worldcitiesDataProvider, worldcitiesDataProvider.GetCountriesAsync, ct); InitializeEntities(worldcitiesDataProvider, worldcitiesDataProvider.GetCitiesAsync, ct); _providersReadyToTransfer = Task.WhenAll(_lookup.Values); }