private async Task<IEnumerable<IAzureRMSubscription>> GetAzureRMSubscriptions()
{
IEnumerable<IAzureRMSubscription> subscriptions = Enumerable.Empty<IAzureRMSubscription>();
Account account = await this.GetAccountAsync();
if (account != null && !account.NeedsReauthentication)
{
IEnumerable<IAzureRMTenant> tenants = await this.tenantService.GetTenantsAsync(account);
foreach (IAzureRMTenant tenant in tenants)
{
subscriptions = subscriptions.Concat(await tenant.GetSubscriptionsAsync());
}
}
return subscriptions;
}