示例#1
0
        private void OnAccountChanged(AccountName accountName)
        {
            AccountDomainObject account = _accountRepository.GetBy(accountName);

            lock (_gate)
            {
                Accounts[accountName] = AccountDomainObjectVersion.Root(account);
            }
        }
		public IAccount GetOrCreate(AccountName accountName)
		{
			IAccount account;
			if(_accounts.TryGetValue(accountName, out account))
			{
				return account;
			}

			return _accounts[accountName] = new AccountDomainObject(accountName, new ProfileCollection(accountName, new ProfileDomainObject[0]));
		}
		public AccountDomainObject(AccountDomainObject other)
		{
			_accountName = other._accountName;
			_profileCollection = new ProfileCollection(other._profileCollection);
		}
 public AccountDomainObject(AccountDomainObject other)
 {
     _accountName       = other._accountName;
     _profileCollection = new ProfileCollection(other._profileCollection);
 }