コード例 #1
0
        private bool IsAffordableForBuyer(string id, IEnumerable <Transaction> transactions)
        {
            var moneyNeeded = transactions.Where(x => x.BuyerId == id).Sum(x => x.TotalCost + x.BuyerProvision);
            var depot       = wallstreetClient.GetInvestorDepot(id, exchangeId);

            return(depot.Budget >= moneyNeeded);
        }
コード例 #2
0
 public InvestorDepot LoadInvestorInformation(string exchangeId)
 {
     if (email != null)
     {
         return(client.GetInvestorDepot(email, exchangeId));
     }
     else
     {
         return(null);
     }
 }