src/NLog/Targets/EventLogTarget.cs
/// <summary>
/// Gets the <see cref="IEventLogWrapper"/> to write to.
/// </summary>
/// <param name="logEvent">Event if the source needs to be rendered.</param>
Gets the  to write to.
Gets the to write to .
private IEventLogWrapper GetEventLog(LogEventInfo logEvent)
        {
            var renderedSource = RenderSource(logEvent);
            var isCacheUpToDate = _eventLogWrapper.IsEventLogAssociated &&
                                  _eventLogWrapper.Log == Log &&
                                  _eventLogWrapper.MachineName == MachineName &&
                                  _eventLogWrapper.Source == renderedSource;
            if (!isCacheUpToDate)
            {
                _eventLogWrapper.AssociateNewEventLog(Log, MachineName, renderedSource);
            }
            return _eventLogWrapper;
        }
private IEventLogWrapper GetEventLog ( LogEventInfo logEvent ) { var renderedSource = RenderSource ( logEvent ) ; var isCacheUpToDate = _eventLogWrapper . IsEventLogAssociated && _eventLogWrapper . Log == Log && _eventLogWrapper . MachineName == MachineName && _eventLogWrapper . Source == renderedSource ; if ( ! isCacheUpToDate ) { _eventLogWrapper . AssociateNewEventLog ( Log , MachineName , renderedSource ) ; } return _eventLogWrapper ; }
Gets the  to write to.
Gets the to write to .
logEvent
LogEventInfo
Event if the source needs to be rendered.
Event if the source needs to be rendered .