private static Restriction BuildComparisonRestriction(ComparisonFilter filter, PropTag ptagToSearch, object propValue)
        {
            Restriction.PropertyRestriction propertyRestriction;
            switch (filter.ComparisonOperator)
            {
            case ComparisonOperator.Equal:
                propertyRestriction = (Restriction.PropertyRestriction)Restriction.EQ(ptagToSearch, propValue);
                break;

            case ComparisonOperator.NotEqual:
                propertyRestriction = (Restriction.PropertyRestriction)Restriction.NE(ptagToSearch, propValue);
                break;

            case ComparisonOperator.LessThan:
                propertyRestriction = (Restriction.PropertyRestriction)Restriction.LT(ptagToSearch, propValue);
                break;

            case ComparisonOperator.LessThanOrEqual:
                propertyRestriction = (Restriction.PropertyRestriction)Restriction.LE(ptagToSearch, propValue);
                break;

            case ComparisonOperator.GreaterThan:
                propertyRestriction = (Restriction.PropertyRestriction)Restriction.GT(ptagToSearch, propValue);
                break;

            case ComparisonOperator.GreaterThanOrEqual:
                propertyRestriction = (Restriction.PropertyRestriction)Restriction.GE(ptagToSearch, propValue);
                break;

            default:
                throw ContentFilterBuilder.UnexpectedFilterType(filter);
            }
            if (ptagToSearch.IsMultiValued())
            {
                propertyRestriction.MultiValued = true;
            }
            return(propertyRestriction);
        }