public SerializableAccount(DefaultAccount account) { this.Alias = account.Alias; this.AccountName = account.AccountName; this.BatchServiceUrl = account.BatchServiceUrl; this.Key = account.Key; this.SecureKey = account.SecureKey; this.UniqueIdentifier = account.UniqueIdentifier; }
public SerializableAccount(DefaultAccount account) { this.Alias = account.Alias; this.AccountName = account.AccountName; this.BatchServiceUrl = account.BatchServiceUrl; this.Key = account.Key; this.SecureKey = account.SecureKey; this.UniqueIdentifier = account.UniqueIdentifier; }
/// <summary> /// See <see cref="IAccountOperationFactory.CreateAddAccountOperation"/>. /// </summary> /// <returns></returns> public AccountManagementAddOperation CreateAddAccountOperation() { Account account = new DefaultAccount(this.parentAccountManager); //Create an empty account to be added. DefaultAccountDialogViewModel accountAdder = new DefaultAccountDialogViewModel(account); DefaultAccountManagementControl control = new DefaultAccountManagementControl(accountAdder); AccountManagementAddOperation operation = new AccountManagementAddOperation(accountAdder, control); return(operation); }
/// <summary> /// See <see cref="IAccountOperationFactory.CreateAddAccountOperation"/>. /// </summary> /// <returns></returns> public AccountManagementAddOperation CreateAddAccountOperation() { Account account = new DefaultAccount(this.parentAccountManager); //Create an empty account to be added. DefaultAccountDialogViewModel accountAdder = new DefaultAccountDialogViewModel(account); DefaultAccountManagementControl control = new DefaultAccountManagementControl(accountAdder); AccountManagementAddOperation operation = new AccountManagementAddOperation(accountAdder, control); return operation; }
public SerializableAccount(DefaultAccount account) { this.Alias = account.Alias; this.AccountName = account.AccountName; this.BatchServiceUrl = account.BatchServiceUrl; this.BatchServiceKey = account.BatchServiceKey; this.BatchSecureKey = account.BatchSecureKey; this.UniqueIdentifier = account.UniqueIdentifier; this.LinkedStorageAccountName = account.LinkedStorageAccountName; this.LinkedStorageAccountKey = account.LinkedStorageAccountKey; this.LinkedStorageSecureKey = account.LinkedStorageSecureKey; }
public DefaultAccount CreateAccountFromSerialization(IAccountManager parentAccountManager) { DefaultAccount account = new DefaultAccount(parentAccountManager) { AccountName = this.AccountName, Alias = this.Alias, BatchServiceUrl = this.BatchServiceUrl, Key = this.Key, SecureKey = this.SecureKey, UniqueIdentifier = this.UniqueIdentifier }; return(account); }
public DefaultAccount CreateAccountFromSerialization(IAccountManager parentAccountManager) { DefaultAccount account = new DefaultAccount(parentAccountManager) { AccountName = this.AccountName, Alias = this.Alias, BatchServiceUrl = this.BatchServiceUrl, Key = this.Key, SecureKey = this.SecureKey, UniqueIdentifier = this.UniqueIdentifier }; return account; }
/// <summary> /// See <see cref="IAccountManager.CloneAccountForEditAsync"/>. /// </summary> /// <param name="account">The account to clone.</param> /// <returns>A deep clone of the account.</returns> public async Task <Account> CloneAccountForEditAsync(Account account) { this.editingIndex = this.Accounts.IndexOf(account); if (this.editingIndex < 0) { throw new Exception("Attempt was made to edit unrecognized account"); } var clone = new DefaultAccount(this) { AccountName = account.AccountName, Alias = account.Alias, Key = account.Key, BatchServiceUrl = account.BatchServiceUrl, UniqueIdentifier = account.UniqueIdentifier, ParentAccountManager = this }; return(clone); }
/// <summary> /// See <see cref="IAccountManager.CloneAccountForEditAsync"/>. /// </summary> /// <param name="account">The account to clone.</param> /// <returns>A deep clone of the account.</returns> public async Task<Account> CloneAccountForEditAsync(Account account) { this.editingIndex = this.Accounts.IndexOf(account); if (this.editingIndex < 0) { throw new Exception("Attempt was made to edit unrecognized account"); } var clone = new DefaultAccount(this) { AccountName = account.AccountName, Alias = account.Alias, Key = account.Key, BatchServiceUrl = account.BatchServiceUrl, UniqueIdentifier = account.UniqueIdentifier, ParentAccountManager = this }; return clone; }