Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 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");
 }
Ejemplo n.º 4
0
 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();
 }