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

InjectAccountPickerAsync() private method

private InjectAccountPickerAsync ( ) : void
return void
        private async void InjectAccountPickerAsync()
        {
            IVsAccountManagementService vsAccountManagementService = ServiceProvider.GlobalProvider.GetService(typeof(SVsAccountManagementService)) as IVsAccountManagementService;

            if (vsAccountManagementService == null)
            {
                return;
            }

            AccountPickerOptions options = new AccountPickerOptions(Window.GetWindow(this), "VS Azure Tooling")
            {
                IsCompactHeight = false,
                UseWindowsPresentationFoundationStyle = false,
                IsAuthenticationStateUIEnabled = true
            };

            EnsureRMAuthenticationManager();
            _accountPicker = await vsAccountManagementService.CreateWpfAccountPickerAsync(options);
            AccountPickerHostControl.Content = _accountPicker.Control;
            _accountPicker.PropertyChanged += OnAccountPickerPropertyChanged;
            _accountPicker.SelectedAccount = await AzureAuthenticationManager.GetCurrentVSAccountAsync();
            UpdateSettings();
        }