示例#1
0
        private async void WebAccountCommandInvoked(WebAccountCommand command, WebAccountInvokedArgs args)
        {
            if (args.Action == WebAccountAction.Remove)
            {
                DebugPrint("Removing account");

                try
                {
                    if (command.WebAccount != null)
                    {
                        await command.WebAccount.SignOutAsync();

                        await WebAccountManager.DeleteWebAccountAsync(command.WebAccount);
                    }
                } catch (Exception ex)
                {
                    Trace.LogException(ex);
                }
            }
        }
        private async void deleteButton_Click(object sender, RoutedEventArgs e)
        {
            await WebAccountManager.DeleteWebAccountAsync(commonOperation.Account);

            commonOperation.ReportCompleted();
        }
 public void Delete( )
 {
     AccountManager.Current.RemoveAccount(Account.Id);
     WebAccountManager.DeleteWebAccountAsync(Account).AsTask().Wait();
 }