コード例 #1
0
        protected sealed override bool run()
        {
            var message   = Message.GetValue();
            var args      = Args.GetValue();
            var eventId   = EventId.GetValueAsObject();
            var exception = Exception.GetValue();

            if (eventId == null && exception == null)
            {
                log(_logger, message, args);
            }
            else if (eventId != null && exception == null)
            {
                log(_logger, (EventId)eventId, message, args);
            }
            else if (eventId == null && exception != null)
            {
                log(_logger, exception, message, args);
            }
            else
            {
                log(_logger, (EventId)eventId, exception, message, args);
            }

            return(true);
        }