public ITotalFinancialContributionFactory CreateTotalFinancialContributionFactory()
        {
            ITotalFinancialContributionFactory factory = null;

            try
            {
                factory = new TotalFinancialContributionFactory();
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(factory);
        }
Esempio n. 2
0
 public ITotalFinancialContribution Calculate(
     ITotalFinancialContributionFactory totalFinancialContributionFactory,
     Ipa pa,
     Ir r,
     ISPx x)
 {
     return(totalFinancialContributionFactory.Create(
                pa.Value
                .Select(
                    i =>
                    r.GetElementAtAsdecimal(
                        i.pIndexElement)
                    *
                    (decimal)x.GetElementAt(
                        i.pIndexElement,
                        i.aIndexElement))
                .Sum()));
 }