Azure.ApiManagement.IngestTool.Views.AccountPickerHost.UpdateSettings C# (CSharp) Method

UpdateSettings() private method

private UpdateSettings ( ) : void
return void
        private async void UpdateSettings()
        {
            Account account = (Account)_accountPicker.SelectedAccount;
            IReadOnlyList<IAzureRMUserAccountSubscriptionContext> subscriptions;

            if (account != null)
            {
                IAzureAuthenticationManager manager = AzureAuthenticationManager;

                if (manager != null)
                {
                    await manager.SetCurrentVSAccountAsync(account);
                }

                Dispatcher.Invoke(() => { IsLoadingSubscriptions = true; });

                subscriptions = (await AzureRMAuthenticationManager.GetSubscriptionsAsync()).ToList();

                Dispatcher.Invoke(() => { IsLoadingSubscriptions = false; });
            }
            else
            {
                subscriptions = NoSubscriptions;
            }

            Dispatcher.Invoke(() =>
            {
                Account = account;
                Subscriptions = subscriptions.ToList();
            });
        }
    }