Пример #1
0
 public DateTime[] Visit(ICouponDecomposable couponDecomposable)
 {
     return(couponDecomposable.Decomposition().Aggregate(new DateTime[0],
                                                         (allEventDates, cpn) => allEventDates.Union(cpn.Accept(this)).ToArray()));
 }
Пример #2
0
 public PaymentInfo[] Visit(ICouponDecomposable couponDecomposable)
 {
     return(couponDecomposable.Decomposition().Aggregate(new PaymentInfo[0],
                                                         (allPayments, cpn) => allPayments.Union(cpn.Accept(this)).ToArray()));
 }
Пример #3
0
            public IFixing[] Visit(ICouponDecomposable couponDecomposable)
            {
                var fixings = EnumerableUtils.Merge(couponDecomposable.Decomposition().Map(Visit));

                return(fixings.OrderBy(f => f.Date).ToArray());
            }
        public IProductPathFlow Visit(ICouponDecomposable couponDecomposable)
        {
            var couponFlows = BuildCouponPathFlow(couponDecomposable.Decomposition());

            return(new CouponArrayPathFlow(couponFlows));
        }