コード例 #1
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());
        }
コード例 #2
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");
 }
コード例 #3
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();
 }