Microsoft.Azure.ServiceManagemenet.Common.ProfileClient.GetAccountOrDefault C# (CSharp) Метод

GetAccountOrDefault() публичный Метод

public GetAccountOrDefault ( string accountName ) : AzureAccount
accountName string
Результат Microsoft.Azure.Commands.Common.Authentication.Models.AzureAccount
        public AzureAccount GetAccountOrDefault(string accountName)
        {
            if (string.IsNullOrEmpty(accountName))
            {
                return Profile.Context.Account;
            }
            else if (Profile.Accounts.ContainsKey(accountName))
            {
                return Profile.Accounts[accountName];
            }
            else
            {
                throw new ArgumentException(string.Format("Account with name '{0}' does not exist.", accountName), "accountName");
            }
        }