コード例 #1
0
ファイル: Program.cs プロジェクト: ItzWarty/BernieAppWindows
 static void Main(string[] args)
 {
     var diService = new AutofacDIService();
     var client = diService.Resolve<IBernieHttpClient>();
     var issues = client.GetIssuesAsync().Result.ToList();
     for (int i = 0; i < issues.Count; i++)
     {
         var issue = issues[i];
         Console.WriteLine(i + ": " + issue.Id + " " + issue.Index + " " + issue.Score + " " + issue.Type +
                           issue.Source.Title);
     }
     var n = int.Parse(Console.ReadLine());
     Console.Clear();
     Console.WriteLine(issues[n].Source.Title);
     Console.WriteLine(issues[n].Source.Body);
 }
コード例 #2
0
        static void Main(string[] args)
        {
            var diService = new AutofacDIService();
            var client    = diService.Resolve <IBernieHttpClient>();
            var issues    = client.GetIssuesAsync().Result.ToList();

            for (int i = 0; i < issues.Count; i++)
            {
                var issue = issues[i];
                Console.WriteLine(i + ": " + issue.Id + " " + issue.Index + " " + issue.Score + " " + issue.Type +
                                  issue.Source.Title);
            }
            var n = int.Parse(Console.ReadLine());

            Console.Clear();
            Console.WriteLine(issues[n].Source.Title);
            Console.WriteLine(issues[n].Source.Body);
        }