public override bool Equals(ChangeMonitorableConfigFile other)
        {
            EvaluatorRuleConfig o = other as EvaluatorRuleConfig;

            if (other == null)
            {
                return(false);
            }
            return(this.Equals(o));
        }
 public bool Equals(EvaluatorRuleConfig other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.ConfigFileName, ConfigFileName) && Equals(other.EventType, EventType) &&
         Equals(other.EventSource, EventSource) && Equals(other.CounterCategory, CounterCategory) &&
         Equals(other.CounterName, CounterName) && Equals(other.CounterInstance, CounterInstance) &&
         Equals(other.ExtendedData, ExtendedData) && Equals(other.Value, Value) &&
         Equals(other.DateTime, DateTime) && Equals(other.DateFormat, DateFormat) &&
         Equals(other.Regex.ToString(), Regex.ToString());
 }
 public EvaluatorRule(EvaluatorRuleConfig config)
 {
     Config = config;
     Id = Config.ConfigFileName;
     _getSource = CreateMatchDelegate(Config.EventSource);
     _getCounterCategory = CreateMatchDelegate(Config.CounterCategory);
     _getCounterInstance = CreateMatchDelegate(Config.CounterInstance);
     _getCounterName = CreateMatchDelegate(Config.CounterName);
     _getExtendedData = CreateMatchDelegate(Config.ExtendedData);
     _getValue = CreateMatchDelegate(Config.Value);
     _getDateTime = CreateMatchDelegate(Config.DateTime);
 }
 public EvaluatorRule(EvaluatorRuleConfig config)
 {
     Config              = config;
     Id                  = Config.ConfigFileName;
     _getSource          = CreateMatchDelegate(Config.EventSource);
     _getCounterCategory = CreateMatchDelegate(Config.CounterCategory);
     _getCounterInstance = CreateMatchDelegate(Config.CounterInstance);
     _getCounterName     = CreateMatchDelegate(Config.CounterName);
     _getExtendedData    = CreateMatchDelegate(Config.ExtendedData);
     _getValue           = CreateMatchDelegate(Config.Value);
     _getDateTime        = CreateMatchDelegate(Config.DateTime);
 }
 private static EvaluatorRule CreateEvaluatorRule(string filePath)
 {
     EvaluatorRule rule = null;
     try
     {
         FileInfo fileInfo = new FileInfo(filePath);
         EvaluatorRuleConfig evaluatorRuleConfig = new EvaluatorRuleConfig(fileInfo.FullName);
         rule = new EvaluatorRule(evaluatorRuleConfig);
     }
     catch (Exception ex)
     {
         _logger.Error("Cannot create rule from rule config file " + filePath + ": " + ex);
     }
     return rule;
 }
        private static EvaluatorRule CreateEvaluatorRule(string filePath)
        {
            EvaluatorRule rule = null;

            try
            {
                FileInfo            fileInfo            = new FileInfo(filePath);
                EvaluatorRuleConfig evaluatorRuleConfig = new EvaluatorRuleConfig(fileInfo.FullName);
                rule = new EvaluatorRule(evaluatorRuleConfig);
            }
            catch (Exception ex)
            {
                _logger.Error("Cannot create rule from rule config file " + filePath + ": " + ex);
            }
            return(rule);
        }
 public bool Equals(EvaluatorRuleConfig other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.ConfigFileName, ConfigFileName) && Equals(other.EventType, EventType) &&
            Equals(other.EventSource, EventSource) && Equals(other.CounterCategory, CounterCategory) &&
            Equals(other.CounterName, CounterName) && Equals(other.CounterInstance, CounterInstance) &&
            Equals(other.ExtendedData, ExtendedData) && Equals(other.Value, Value) &&
            Equals(other.DateTime, DateTime) && Equals(other.DateFormat, DateFormat) &&
            Equals(other.Regex.ToString(), Regex.ToString()));
 }