Пример #1
0
        protected BaseLogger(ILog log, string eventSourceName, string eventLogName, IEventLog proxy)
        {
            Log = log;
            _eventSourceName = eventSourceName;
            EventLog = proxy;

            if (string.IsNullOrEmpty(eventSourceName)) return;
            if (!EventLog.SourceExists(eventSourceName))
                EventLog.CreateEventSource(eventSourceName, eventLogName);
        }