// GET: DemoWithTable public void IndexAsync() { var vm = new DataCatalogViewModel { WebApiBaseUrl = ConfigurationManager.AppSettings["DataCatalogWebApiUrl"] }; AsyncManager.OutstandingOperations.Increment(3); Task.Factory.StartNew(() => { DataCatalogViewModel result = DataStoreSrv.RunAsync(vm, "/GetGraphInfos").Result; AsyncManager.Parameters["vm"] = result; AsyncManager.OutstandingOperations.Decrement(); }); Task.Factory.StartNew(() => { DataCatalogViewModel result = DataStoreSrv.GetPublishersAsync(vm, "/GetOrganisations").Result; AsyncManager.Parameters["publishers"] = result.Publishers; AsyncManager.OutstandingOperations.Decrement(); }); Task.Factory.StartNew(() => { DataCatalogViewModel result = DataStoreSrv.GetOrganisationsAsync(vm, "/GetOrganisations").Result; AsyncManager.Parameters["organisations"] = result.Organisations; AsyncManager.OutstandingOperations.Decrement(); }); }
public void DistributionAsync(string graphId, string distId) { var vm = new DistributionViewModel(); var webApiBaseUrl = ConfigurationManager.AppSettings["DataCatalogWebApiUrl"]; var url = webApiBaseUrl + $"/GetDistribution?graphId={graphId}&distributionId={distId}"; AsyncManager.OutstandingOperations.Increment(); Task.Factory.StartNew(() => { DistributionViewModel result = DataStoreSrv.RunAsync(vm, url).Result; AsyncManager.Parameters["distribution"] = result; AsyncManager.OutstandingOperations.Decrement(); } ); }
public void DatasetAsync(string id) { var vm = new DataSetViewModel(); var webApiBaseUrl = ConfigurationManager.AppSettings["DataCatalogWebApiUrl"]; var url = webApiBaseUrl + $"/GetDataset?graphId={id}"; AsyncManager.OutstandingOperations.Increment(); Task.Factory.StartNew(() => { DataSetViewModel result = DataStoreSrv.RunAsync(vm, url).Result; result.Id = id; AsyncManager.Parameters["dataset"] = result; AsyncManager.OutstandingOperations.Decrement(); }); }
// GET: DatasetWelcome public void IndexAsync() { var vm = new DataCatalogStatisticsViewModel { WebApiBaseUrl = ConfigurationManager.AppSettings["DataCatalogWebApiUrl"] }; AsyncManager.OutstandingOperations.Increment(); Task.Factory.StartNew(() => { DataCatalogStatisticsViewModel result = DataStoreSrv.RunAsync(vm, "/GetDataCatalogStatistics").Result; AsyncManager.Parameters["vm"] = result; AsyncManager.OutstandingOperations.Decrement(); }); }
public void DistributionsAsync(string id) { var vm = new List <DistributionViewModel>(); var webApiBaseUrl = ConfigurationManager.AppSettings["DataCatalogWebApiUrl"]; AsyncManager.OutstandingOperations.Increment(); Task.Factory.StartNew(() => { var result = DataStoreSrv.RunAsync(vm, $"{webApiBaseUrl}/GetDistributions/{id}").Result; AsyncManager.Parameters["vm"] = result; AsyncManager.Parameters["id"] = id; AsyncManager.OutstandingOperations.Decrement(); }); }