public static All ( string name ) : |
||
name | string | The name of the element to test. |
return |
public static QueryConditionList All(string name, params BsonValue[] values)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (values == null)
{
throw new ArgumentNullException("values");
}
return new QueryConditionList(name).All(values);
}
public void TestAllParams() { var query = Query.All("j", 2, 4, null, 6); // null will be skipped due to functional construction semantics var expected = "{ \"j\" : { \"$all\" : [2, 4, 6] } }"; Assert.AreEqual(expected, query.ToJson()); }