Ejemplo n.º 1
0
 /// <summary>
 /// Creates a ValuationMutation from a previous ValuationMutation (with older date)
 /// </summary>
 /// <param name="mutationDate">The date for the new valuation mutation</param>
 /// <param name="prevMutation">The previous mutation</param>
 internal ValuationMutation(DateTime mutationDate, IValuationMutation prevMutation)
 {
     if (prevMutation != null)
     {
         this.Date = mutationDate;
         this.PreviousMutation = prevMutation;
         this.Account = prevMutation.Account;
         this.Size = prevMutation.Size;
         this.BookValue = prevMutation.BookValue;
         this.BookValueIC = prevMutation.BookValueIC;
         this.RealisedCurrencyGainToDate = prevMutation.RealisedCurrencyGainToDate;
         this.AvgOpenExRate = prevMutation.AvgOpenExRate;
         this.InstrumentCurrency = prevMutation.InstrumentCurrency;
     }
     else
         throw new ApplicationException("Previous valuation can not be null");
 }
 internal JournalEntryLineValuationMapping(IJournalEntryLine line, IValuationMutation mutation)
 {
     this.key = line.Key;
     this.ValuationMutation = mutation;
     this.IsRelevant = line.IsRelevant;
 }