예제 #1
0
        static void Main(string[] args)
        {
            var memoService = new MemoService(new BitprimInsightAPI());

            Console.WriteLine("Scraping...");
            var posts = memoService.GetLatestPosts(5, OnScrapingProgressReport);
            int i     = 0;

            foreach (string post in posts)
            {
                Console.WriteLine((++i) + ": " + post);
            }
            Console.WriteLine("Done! Press any key to finish");
            Console.ReadKey();
        }
예제 #2
0
 static void Main(string[] args)
 {
     try
     {
         using (var bitprimApi = new BitprimCsAPI("bcc-testnet.cfg"))
         {
             var memoService = new MemoService(bitprimApi);
             bitprimApi.StartNode();
             Console.WriteLine("Scraping...");
             var posts = memoService.GetLatestPosts(5, OnScrapingProgressReport);
             int i     = 0;
             foreach (string post in posts)
             {
                 Console.WriteLine((++i) + ": " + post);
             }
             Console.WriteLine("Done! Press any key to finish");
         }
         Console.ReadKey();
     }
     catch (Exception e)
     {
         Console.WriteLine("Fatal error: " + e);
     }
 }