/// <summary>
        /// Attempts to evaluate if all conditions described by the given string are true.
        /// </summary>
        static public bool TryEvaluate(this IVariantResolver inResolver, object inContext, StringSlice inEvalData, IMethodCache inInvoker = null)
        {
            if (inEvalData.IsWhitespace)
            {
                return(true);
            }

            StringSlice.ISplitter splitter = QuoteAwareSplitter ?? (QuoteAwareSplitter = new StringUtils.ArgsList.Splitter(false));
            VariantComparison     comp;

            foreach (var group in inEvalData.EnumeratedSplit(splitter, StringSplitOptions.RemoveEmptyEntries))
            {
                if (!VariantComparison.TryParse(group, out comp) || !comp.Evaluate(inResolver, inContext, inInvoker))
                {
                    return(false);
                }
            }

            return(true);
        }
        /// <summary>
        /// Attempts to parse a comparison.
        /// </summary>
        static public bool TryParse(StringSlice inData, out VariantComparison outComparison)
        {
            inData = inData.Trim();

            VariantCompareOperator op = VariantCompareOperator.True;
            int operatorIdx           = -1;
            int operatorLength        = 0;

            VariantUtils.TryFindOperator(inData, EqualsOperator, VariantCompareOperator.EqualTo, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, NotEqualOperator, VariantCompareOperator.NotEqualTo, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, GreaterThanOrEqualToOperator, VariantCompareOperator.GreaterThanOrEqualTo, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, LessThanOrEqualToOperator, VariantCompareOperator.LessThanOrEqualTo, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, GreaterThanOperator, VariantCompareOperator.GreaterThan, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, LessThanOperator, VariantCompareOperator.LessThan, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, NotOperator, VariantCompareOperator.False, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, ShortEqualsOperator, VariantCompareOperator.EqualTo, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, ExistsOperator, VariantCompareOperator.Exists, ref operatorIdx, ref op, ref operatorLength);
            VariantUtils.TryFindOperator(inData, DoesNotExistOperator, VariantCompareOperator.DoesNotExist, ref operatorIdx, ref op, ref operatorLength);

            if (operatorIdx < 0)
            {
                op = VariantCompareOperator.True;
            }

            outComparison.Operator = op;

            StringSlice idSlice          = StringSlice.Empty;
            StringSlice operandSlice     = StringSlice.Empty;
            bool        bRequiresOperand = true;

            switch (op)
            {
            case VariantCompareOperator.False:
            {
                idSlice          = inData.Substring(1).TrimStart();
                bRequiresOperand = false;
                break;
            }

            case VariantCompareOperator.True:
            {
                idSlice          = inData;
                bRequiresOperand = false;
                break;
            }

            case VariantCompareOperator.Exists:
            {
                idSlice          = inData.Substring(0, operatorIdx).TrimEnd();
                bRequiresOperand = false;
                break;
            }

            case VariantCompareOperator.DoesNotExist:
            {
                idSlice          = inData.Substring(0, operatorIdx).TrimEnd();
                bRequiresOperand = false;
                break;
            }

            default:
            {
                idSlice      = inData.Substring(0, operatorIdx).TrimEnd();
                operandSlice = inData.Substring(operatorIdx + operatorLength).TrimStart();
                break;
            }
            }

            if (!VariantOperand.TryParse(idSlice, out outComparison.Left))
            {
                outComparison = default(VariantComparison);
                return(false);
            }

            if (!bRequiresOperand)
            {
                outComparison.Right = default(VariantOperand);
                return(true);
            }

            return(VariantOperand.TryParse(operandSlice, out outComparison.Right));
        }