Exemple #1
0
        private string GenerateName(ICurveRecipeCreated @event, MarketCurveNamePartDto marketCurvePart)
        {
            var stringBuilder = new StringBuilder("C");

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

            return(stringBuilder.ToString());
        }
Exemple #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));
        }