private FilterExpressionType GetArgumentIntersectTypes() { var supported = LeftValue.SupportedTypes .Intersect(RightValue.SupportedTypes) .Except(new[] { FilterExpressionType.Set }) .ToArray(); if (supported.Any()) { return(supported.First()); } supported = LeftValue.SupportedTypes .Except(new[] { FilterExpressionType.Set }) .ToArray(); if (supported.Any()) { return(supported.First()); } // not matched throw FilterQueryException.CreateUnsupportedType( LeftValue.ToQuery(), new[] { FilterExpressionType.Boolean, FilterExpressionType.Numeric, FilterExpressionType.String }, this.ToQuery()); }
public override string ToQuery() { return(LeftValue.ToQuery() + " " + OperatorString + " " + RightValue.ToQuery()); }