예제 #1
0
        private async Task RefreshAsync()
        {
            EventLog.LogEvent("refreshAzureAccount", "name: {name}", _client?.UserInfo?.DisplayableId);

            IsLoading = true;

            try
            {
                Children.Clear();

                IReadOnlyCollection <KeyValuePair <string, ISubscription> > allSubscriptions = await _client.ListAllSubscriptionsAsync();

                foreach (KeyValuePair <string, ISubscription> sub in allSubscriptions)
                {
                    Children.Add(new AzureSubscription(_client.GetAuthenticated(sub.Key), sub.Value));
                }
            }
            catch (Exception ex)
            {
                Error = ex;
            }
            finally
            {
                IsLoading = false;
            }
        }
예제 #2
0
 private async Task InitialiseAsync()
 {
     //kick off client initialisation
     await _azure.ListAllSubscriptionsAsync();
 }