Пример #1
0
        public string Get()
        {
            var c = new AsyncTest();

            c.Current = new testDate();
            return(c.Current.date.ToString());
        }
Пример #2
0
        public async Task <string> Get()
        {
            var lo = new System.Threading.ThreadLocal <int>();

            lo.Value = 1;
            var c = new AsyncTest();

            c.Current = new testDate();
            var s = c.Current.date.ToString();

            var da = Task.Factory.StartNew(() =>
            {
                System.Threading.Thread.Sleep(10000);
                var aad = new AsyncTest();
                return(aad.Current.date.ToString());
            });

            c = new AsyncTest();
            return(s + ":");
        }