Ejemplo n.º 1
0
        private string GenerateName(ICurveRecipeCreated @event, MarketCurveNamePartDto marketCurvePart)
        {
            var stringBuilder = new StringBuilder("C");

            stringBuilder.AppendFormatNonEmptyString("_{0}", marketCurvePart.Value, @event.DayCountConvention);

            return(stringBuilder.ToString());
        }
Ejemplo n.º 2
0
        public Task Handle(IEventWrapper <IMarketCurveCreated> @event, CancellationToken cancellationToken)
        {
            var dto = new MarketCurveNamePartDto
            {
                Id    = @event.AggregateId,
                Value = GenerateName(@event.Content)
            };

            return(_marketCurveRepository.Insert(dto));
        }