Example #1
0
        private async void Initialize_Click(object sender, RoutedEventArgs e)
        {
            var o = new AsyncConstructorInitialize();

            Result = o;

            await o.InitializeAsync();
        }
        public async Task Initialize()
        {
            var o = new AsyncConstructorInitialize();

            await o.InitializeAsync();

            Assert.IsTrue(o.Completed);
        }
        public async Task <IHttpActionResult> Initialize()
        {
            var o = new AsyncConstructorInitialize();

            // Recommended way
            // Easy to link the task
            await o.InitializeAsync();

            return(Ok(o.Message));
        }