public bool Equals(LogEventEvaluationRule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.Id, Id));
 }
        public void UnregisterRule(LogEventEvaluationRule rule)
        {
            _rwLocker.EnterWriteLock();

            try
            {
            _eventEvaluationRules.Remove(rule);
            }
            finally
            {
                _rwLocker.ExitWriteLock();
            }
        }
        public void UnregisterRule(LogEventEvaluationRule rule)
        {
            _rwLocker.EnterWriteLock();

            try
            {
                _eventEvaluationRules.Remove(rule);
            }
            finally
            {
                _rwLocker.ExitWriteLock();
            }
        }
        public static LogEventEvaluationRule LoadFromConfigFile(string fileName)
        {
            SettingsReader         settingsReader  = new SettingsReader(fileName);
            string                 type            = settingsReader.GetConfigParam("Type");
            string                 source          = settingsReader.GetConfigParam("Source");
            string                 counterCategory = settingsReader.GetConfigParam("Category");
            string                 counterName     = settingsReader.GetConfigParam("Counter");
            string                 instance        = settingsReader.GetConfigParam("Instance", false);
            string                 extendedData    = settingsReader.GetConfigParam("ExtendedData", false);
            string                 value           = settingsReader.GetConfigParam("Value");
            string                 dateTime        = settingsReader.GetConfigParam("DateTime");
            string                 dateFormat      = settingsReader.GetConfigParam("DateFormat");
            string                 regex           = settingsReader.GetConfigParam("Regex");
            LogEventEvaluationRule result          = new LogEventEvaluationRule(fileName, regex, type, source, counterCategory,
                                                                                counterName, instance,
                                                                                extendedData, value, dateTime, dateFormat);

            return(result);
        }
 public bool Equals(LogEventEvaluationRule other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Id, Id);
 }
 public static LogEventEvaluationRule LoadFromConfigFile(string fileName)
 {
     SettingsReader settingsReader = new SettingsReader(fileName);
     string type = settingsReader.GetConfigParam("Type");
     string source = settingsReader.GetConfigParam("Source");
     string counterCategory = settingsReader.GetConfigParam("Category");
     string counterName = settingsReader.GetConfigParam("Counter");
     string instance = settingsReader.GetConfigParam("Instance", false);
     string extendedData = settingsReader.GetConfigParam("ExtendedData", false);
     string value = settingsReader.GetConfigParam("Value");
     string dateTime = settingsReader.GetConfigParam("DateTime");
     string dateFormat = settingsReader.GetConfigParam("DateFormat");
     string regex = settingsReader.GetConfigParam("Regex");
     LogEventEvaluationRule result = new LogEventEvaluationRule(fileName, regex, type, source, counterCategory,
                                                                counterName, instance,
                                                                extendedData, value, dateTime, dateFormat);
     return result;
 }