using System.Collections.Generic;
namespace TINK.Model.User.Account
{
///
/// Holds email address and password.
///
public class AccountMutable : IAccount
{
///
/// Holds the account data.
///
private Account m_oAccount;
public AccountMutable(IAccount p_oSource)
{
m_oAccount = new Account(p_oSource);
}
public void Copy(IAccount p_oSource)
{
m_oAccount = new Account(p_oSource);
}
///
/// Mail address.
///
public string Mail
{
get { return m_oAccount.Mail; }
set { m_oAccount = new Account(value, m_oAccount.Pwd, m_oAccount.SessionCookie, m_oAccount.Group, m_oAccount.DebugLevel); }
}
///
/// Password of the account.
///
public string Pwd
{
get { return m_oAccount.Pwd; }
set { m_oAccount = new Account(m_oAccount.Mail, value, m_oAccount.SessionCookie, m_oAccount.Group, m_oAccount.DebugLevel); }
}
///
/// Session cookie used to sign in to copri.
///
public string SessionCookie
{
get { return m_oAccount.SessionCookie; }
set { m_oAccount = new Account(m_oAccount.Mail, m_oAccount.Pwd, value, m_oAccount.Group, m_oAccount.DebugLevel); }
}
///
/// Holds the group of the bike (TINK, Konrad, ...).
///
public IEnumerable Group
{
get { return m_oAccount.Group; }
}
///
/// Debug level used to determine which features are available.
///
public Permissions DebugLevel
{
get { return m_oAccount.DebugLevel; }
set { m_oAccount = new Account(m_oAccount.Mail, m_oAccount.Pwd, m_oAccount.SessionCookie, m_oAccount.Group, value); }
}
}
}