private async Task LoadPipelines(bool reload) { try { InitProgress(reload); GoTrayFeedSource feedDataSource = new GoTrayFeedSource(_config.GoServerUrl, _config.GoServerUserName, _config.GoServerPassword); IEnumerable<GoProject> projects = await feedDataSource.projects; Projects = projects; ResetProgress(); } catch (Exception ex) { Projects = Enumerable.Empty<GoProject>(); ResetProgress(); ShowException(ex); } }
private async Task LoadPipelines(bool reload) { try { InitProgress(reload); var feedDataSource = new GoTrayFeedSource(_config.GoServerUrl, _config.GoServerUserName, _config.GoServerPassword); IEnumerable<Pipeline> pipelines = await feedDataSource.pipelines; Projects = FilterUnpinnedPipelines(pipelines); ResetProgress(); } catch (Exception ex) { Projects = Enumerable.Empty<Pipeline>(); ResetProgress(); ShowException(ex); } DefaultViewModel["LastUpdatedTime"] = "Last Updated: " + DateTime.Now.ToString("HH:mm:ss tt"); StartAutoRefresh(); }
private async void SilentRefresh() { try { var feedDataSource = new GoTrayFeedSource(_config.GoServerUrl, _config.GoServerUserName, _config.GoServerPassword); IEnumerable<Pipeline> projects = await feedDataSource.pipelines; Projects = FilterUnpinnedPipelines(projects); } catch (Exception ex) { Projects = Enumerable.Empty<Pipeline>(); ShowException(ex); } DefaultViewModel["LastUpdatedTime"] = "Last Updated: " + DateTime.Now.ToString("HH:mm:ss tt"); }
private static async Task<List<Pipeline>> PipelinesFromFeed() { var feedDataSource = new GoTrayFeedSource(CctrayUrl,Username, Password); IEnumerable<Pipeline> projects = await feedDataSource.pipelines; return projects.OrderBy(p => p.PipelineName).ToList(); }