private async Task ProcessAsync(IAuthenticatedCommand command) { await _operationService.ProcessAsync(command.Request.Id); await _bus.PublishAsync(new OperationUpdated(command.Request.Id, command.UserId, States.Processing, DateTime.UtcNow, string.Empty)); }
private async Task CreateAsync(IAuthenticatedCommand command) { await _operationService.CreateAsync(command.Request.Id, command.UserId, command.Request.Origin, command.Request.Resource, command.Request.CreatedAt); await _bus.PublishAsync(new OperationCreated(command.Request.Id, command.UserId, command.Request.Origin, command.Request.Resource, States.Accepted, command.Request.CreatedAt, DateTime.UtcNow, string.Empty)); }
private async Task CreateForAuthenticatedUserAsync(IAuthenticatedCommand command) => await CreateAsync(command, command.UserId);