예제 #1
0
 static async Task Main(string[] args)
 {
     Console.WriteLine("Hello World!");
     await new Program().Method1();
     Console.WriteLine($"Key Value [{AsyncLocalDictionary.GetLogicalValue<string>(key)}] should be null");
     Console.ReadKey();
 }
예제 #2
0
        async Task Method3()
        {
            AsyncLocalDictionary.SetLogicalValue(key, "Method3");
            await Task.Delay(10);

            Console.WriteLine($"Key Value [{AsyncLocalDictionary.GetLogicalValue<string>(key)}] should be Method3");
        }