예제 #1
0
 internal ValuationCostIncomeMutation(ValuationKey key, DateTime mutationDate, ValuationCostIncomeMutation prevMutation)
     : this(key, mutationDate)
 {
     if (prevMutation != null)
     {
         this.CostsCommissionToDate = prevMutation.CostsCommissionToDate;
         this.CostsTaxToDate = prevMutation.CostsTaxToDate;
         this.CostsOtherToDate = prevMutation.CostsOtherToDate;
         this.IncomeCashDividendToDate = prevMutation.IncomeCashDividendToDate;
         this.IncomeInterestToDate = prevMutation.IncomeInterestToDate;
         this.IncomeOtherToDate = prevMutation.IncomeOtherToDate;
     }
 }
예제 #2
0
 internal void AddCash(IPositionTx posTx)
 {
     DateTime tradeDate = posTx.TransactionDate;
     ValuationCostIncomeMutation mutation;
     if (mutationsCI.ContainsKey(tradeDate))
         mutation = mutationsCI[tradeDate];
     else
     {
         mutation = new ValuationCostIncomeMutation(this, tradeDate, LastMutationCI);
         if (mutationsCI.Count == 0)
             FirstMutationCI = mutation;
         mutationsCI.Add(tradeDate, mutation);
         LastMutationCI = mutation;
     }
     mutation.AddTx(posTx);
 }