Acropolis.Foundation.EventSourcing.Logging.LogManager.LogEventHandler C# (CSharp) Метод

LogEventHandler() публичный Метод

public LogEventHandler ( EventHandlerRecord record ) : void
record EventHandlerRecord
Результат void
        public void LogEventHandler(EventHandlerRecord record)
        {
            try
            {
                var handlerDoc = EventHandlerRecord.ToBson(record);

                var query = Query.And(
                    Query.EQ("_id", record.CommandId),
                    Query.EQ("Events.Event.Metadata.EventId", record.EventId)
                );

                var update = Update.Push("Events.$.Handlers", handlerDoc);
                Write.Logs.Update(query, update);
            }
            catch(Exception e)
            {
                // Catch all errors because logging should not throw errors if unsuccessful
            }
        }

Same methods

LogManager::LogEventHandler ( String commandId, String eventId, String handlerTypeName, Exception exception = null ) : void