コード例 #1
0
        public void Enrich(IHalResponseBuilder halResponseBuilder, DiscountAggregate discountAggregate)
        {
            if (halResponseBuilder == null)
            {
                throw new ArgumentNullException(nameof(halResponseBuilder));
            }

            if (discountAggregate == null)
            {
                throw new ArgumentNullException(nameof(discountAggregate));
            }

            halResponseBuilder.AddEmbedded(e => e.AddObject(_responseBuilder.GetDiscount(discountAggregate)));
        }