Esempio n. 1
0
        private async Task RaiseLocationsQueriedEvent(GetLocationsQuery request, CancellationToken cancellationToken)
        {
            var e = new LocationListQueriedEvent
            {
                Aggregate    = nameof(GetLocationsQuery),
                DataAsJson   = String.Empty,
                AggregateId  = request.Id.ToString(),
                MajorVersion = 1,
                MinorVersion = 1,
                Name         = nameof(request)
            };

            _logger.LogInformation("Logged event of type {LocationListQueriedEvent} {e}, {request}, {RaiseLocationsQueriedEvent}", typeof(LocationListQueriedEvent), e, request, nameof(RaiseLocationsQueriedEvent));

            await _mediator.Publish(e, cancellationToken);
        }
        private async Task RaiseLocationListQueriedEvent(LocationQueryStringParameters parameters, CancellationToken cancellation)
        {
            var e = new LocationListQueriedEvent(parameters);

            await _mediator.Publish(e, cancellation);
        }