Exemplo n.º 1
0
        // Token: 0x06000028 RID: 40 RVA: 0x000033A8 File Offset: 0x000015A8
        public static LogEvaluator FromCondition(LogCondition condition, CsvTable table)
        {
            Dictionary <string, LogVariableEvaluator> variables = new Dictionary <string, LogVariableEvaluator>();
            LogEvaluator logEvaluator = LogEvaluator.FromCondition(condition, table, variables, 100);

            LogEvaluator.CheckOptimization(condition, logEvaluator.searches, table.IndexedFields, 0);
            return(logEvaluator);
        }
Exemplo n.º 2
0
        // Token: 0x0600002A RID: 42 RVA: 0x000033DC File Offset: 0x000015DC
        private static bool CheckOptimization(LogCondition condition, List <IndexedSearch> searches, CsvField[] indexedFields, int optimizationCheckRecursionDepth)
        {
            if (optimizationCheckRecursionDepth > 2)
            {
                return(false);
            }
            LogAndCondition logAndCondition = condition as LogAndCondition;

            if (logAndCondition != null)
            {
                foreach (LogCondition condition2 in logAndCondition.Conditions)
                {
                    if (LogEvaluator.CheckOptimization(condition2, searches, indexedFields, optimizationCheckRecursionDepth + 1))
                    {
                        return(true);
                    }
                }
                return(false);
            }
            return(LogEvaluator.CheckFieldEqualsConstantCondition(condition, searches, indexedFields));
        }