示例#1
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                await Task.Run(async() => await AuthManager.AuthAsync());

                this.tbInfo.Text = $"Succeed {AuthManager.UserId}";
                var u = await User.FetchAsync(AuthManager.UserId);
            }
            catch (Exception ex)
            {
                // Authentication failed. Handle parameter, SSL/TLS, and Network Unavailable errors here.
                this.tbInfo.Text = ex.Message;
            }
        }