Example #1
0
 internal void AddProperty(QueryProperty property)
 {
     lock (_propertiesLock)
     {
         _properties.Add(property.Name, property);
     }
 }
Example #2
0
 internal void AddProperty(QueryProperty property)
 {
     lock (_propertiesLock)
     {
         _properties.Add(property.Name, property);
     }
 }
Example #3
0
        private static QueryProperty Add <T>(QueryProperty property, string operatorName, params T[] operands)
        {
            var expression = string.Format("[{0}]",
                                           string.Join(",", operands.Select(QueryOperator.ConvertOperandToJson)));

            property.AddOperator(new QueryOperator(operatorName, expression));

            return(property);
        }
Example #4
0
        public static QueryProperty HasAll <T>(this QueryProperty property, params T[] values)
        {
            var expression = string.Format("[{0}]",
                                           string.Join(",", values.Select(QueryOperator.ConvertOperandToJson <T>)));

            property.AddOperator(new QueryOperator("$all", expression));

            return(property);
        }
Example #5
0
 public static QueryProperty In <T>(this QueryProperty property, params T[] operands)
 {
     return(Add(property, "$in", operands));
 }