예제 #1
0
        static void Main(string[] args)
        {
            var log = new LoggerConfiguration()
                      .Enrich.WithThreadId()
                      .WriteTo.ColoredConsole(outputTemplate: "{Timestamp:HH:mm} [{Level}][th:{ThreadId}] ({Name:l}) {Message}{NewLine}{Exception}")
                      .CreateLogger();

            Log.Logger = log;

            // TaskExamples.ReadFile();
            // TaskExamples.ReadSocket();

            //HttpClientExamples.First();
            //HttptClientExamples.RequestsInSequence();
            // Task t = HttpClientExamples.RequestsInSequence3();
            //Logger.Info("main is ending");
            //return t;

            //Logger.Info("start");
            //Task<int> t = AsyncAwaitExamples.First();
            //Task<int> t = AsyncAwaitExamples.Second();
            //Logger.Info($"Task status is '{t.Status}'");
            //Logger.Info("end");

            // return TcpServerExample.EchoServer();
            TestAsyncSemaphore.Run();
        }
예제 #2
0
 public static void Main(string[] args)
 {
     TestAsyncSemaphore.Run();
 }