// ----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
// ----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
// ----------------------------------------------------------------------------------

namespace Microsoft.Samples.WindowsAzureMmc.SnapIn.Configuration
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Collections.ObjectModel;

  /// <summary>
  /// Configuration data for a single account
  /// </summary>
  public class Account
  {
    /// <summary>
    /// The name of the account
    /// </summary>
    public string AccountName { get; set; }
    /// <summary>
    /// The shared key for the account
    /// </summary>
    public string AccountKey { get; set; }
    /// <summary>
    /// A collection of services that this account can access
    /// </summary>
    public Dictionary<string, Service> Services { get; private set; }

    /// <summary>
    /// Is this account for local dev storage?
    /// </summary>
    public bool IsLocal { get; set; }

    /// <summary>
    /// Base constructor
    /// </summary>
    public Account()
    {
      Services = new Dictionary<string, Service>();
    }

    /// <summary>
    /// A slightly better constructor
    /// </summary>
    /// <param name="name"></param>
    /// <param name="key"></param>
    public Account(string name, string key)
      : this()
    {
      AccountName = name;
      AccountKey = key;
    }

    /// <summary>
    /// Let the account name be the ToString value
    /// </summary>
    /// <returns></returns>
    public override string ToString()
    {
      return AccountName;
    }
  }
}