public async System.Threading.Tasks.Task <ViewResult> ShowLength2()
        {
            long?len = await MyAsyncMethods.GetPageLength2();

            return(View("Result", (object)String.Format("page length: {0}", len)));
        }
Example #2
0
 public ViewResult GetLength2()
 {
     return(View("Result", (object)MyAsyncMethods.GetPageLength2().ToString()));
 }
        public async Task <ViewResult> AsyncMethod()
        {
            long?length = await MyAsyncMethods.GetPageLength2();

            return(View("Index", new string[] { $"Length: {length}" }));
        }
Example #4
0
        public ViewResult GetAsyncResult()
        {
            var contentLength = MyAsyncMethods.GetPageLength2();

            return(View("Results", (object)String.Format("Content Length of Apress.com is: {0}", contentLength.ToString())));
        }