Program.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using MathConsoleApp;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Threading.Tasks.Dataflow;
  10. namespace ConsoleAppNet45
  11. {
  12. internal class Program
  13. {
  14. private static void Main(string[] args)
  15. {
  16. //ActionBlock<bool> ExcuteBlock = new ActionBlock<bool>(x => { Console.WriteLine(x); }); ;
  17. //Task<bool> task = new Task<bool>(() =>
  18. //{
  19. // for (int i = 0; i < 100; i++)
  20. // {
  21. // Task.Delay(50).Wait();
  22. // ExcuteBlock.Post(false);
  23. // }
  24. // return false;
  25. //});
  26. // task.Start();
  27. //while (true)
  28. //{
  29. // Task.Delay(500).Wait();
  30. // var res = ExcuteBlock.Completion.IsCompleted;
  31. // Console.WriteLine(res+ "Completion");
  32. //}
  33. DateTime date = default;
  34. Console.WriteLine(date.ToLongTimeString());
  35. //ExcuteBlock.
  36. // var res = task.Result;
  37. //var res = ExcuteBlock.AsObserver();
  38. //res.OnCompleted();
  39. //Debug.WriteLine();
  40. Console.ReadLine();
  41. }
  42. }
  43. }