AzureIoTHubConnectedService.AccountPicker.ViewModel_AuthenticationChanged C# (CSharp) Method

ViewModel_AuthenticationChanged() private method

private ViewModel_AuthenticationChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private async void ViewModel_AuthenticationChanged(object sender, EventArgs e)
        {
            // whenever the AuthenticationChanged event is raised outside of the AccountPicker changing accounts,
            // ensure the AccountPicker is synced with the current account
            if (!this.isRespondingToSelectedAccountPropertyChanged)
            {
                Account account = await this.viewModel.GetAccountAsync();
                this.picker.SelectedAccount = account;
            }
        }
    }