public Task HandleAsync(BankIdEvent bankIdEvent)
        {
            var eventId         = new EventId(bankIdEvent.EventTypeId, bankIdEvent.EventTypeName);
            var serializedEvent = JsonSerializer.Serialize(bankIdEvent, bankIdEvent.GetType(), _serializerOptions);

            _logger.LogDebug(eventId, serializedEvent);

            return(Task.CompletedTask);
        }
Example #2
0
 private string GetSerializedEventOrError(BankIdEvent bankIdEvent)
 {
     try
     {
         return(JsonSerializer.Serialize(bankIdEvent, bankIdEvent.GetType(), _serializerOptions));
     }
     catch (Exception e)
     {
         return(e.Message);
     }
 }