Exemple #1
0
        /// <summary>Update the state of the account from received account info</summary>
        private void Update(IAccount acct)
        {
            var acct_change = AccountId != acct.Number;

            if (acct_change)
            {
                AccountChanging.Raise(this);
            }

            AccountId = acct.Number;
            IsLive    = acct.IsLive;
            Currency  = acct.Currency;
            Balance   = acct.Balance;
            Equity    = acct.Equity;
            Leverage  = acct.PreciseLeverage;

            if (acct_change)
            {
                AccountChanged.Raise(this);
            }
        }
Exemple #2
0
        /// <summary>Update the state of the account from received account info</summary>
        public void Update(Account acct)
        {
            var acct_change = AccountId != acct.AccountId;

            if (acct_change)
            {
                AccountChanging.Raise(this);
            }

            AccountId = acct.AccountId;
            IsLive    = acct.IsLive;
            Currency  = acct.Currency;
            Balance   = acct.Balance;
            Equity    = acct.Equity;
            Leverage  = acct.Leverage;

            if (acct_change)
            {
                AccountChanged.Raise(this);
            }
        }