コード例 #1
0
ファイル: Program.cs プロジェクト: ibliskavka/reddit-reader
        static void Main(string[] args)
        {
            var reader = new RedditClient(30);
            reader.AddSource("nsx");
            reader.AddSource("acura");

            reader.Next().ContinueWith(x =>
            {
                foreach (var redditItem in x.Result)
                {
                    Console.WriteLine("{0}:\t{1}"
                        , (string.IsNullOrWhiteSpace(redditItem.Thumbnail)) ? "TEXT" : "IMAGE"
                        , redditItem.Title);
                }
            });

            Console.WriteLine("Please wait for async operation to complete. Press Enter to close console.");
            Console.ReadLine();
        }