コード例 #1
0
        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());
        }
コード例 #2
0
 public override string ToQuery()
 {
     return(LeftValue.ToQuery() + " " + OperatorString + " " + RightValue.ToQuery());
 }