/// <summary> /// Creates a filter using the specified query objects /// </summary> /// <param name="objectType">The object type to query</param> /// <param name="queryOperator">The operator used to compare the query elements</param> /// <param name="queries">The query elements</param> /// <returns>An XPath query string</returns> internal static string CreateFilter(string objectType, GroupOperator queryOperator, IEnumerable <IXPathQueryObject> queries) { XPathQueryGroup group = new XPathQueryGroup(queryOperator, queries); group.GroupOperator = queryOperator; return(XPathFilterBuilder.CreateFilter(objectType, group)); }
/// <summary> /// Creates an XPath filter for the specified object type and attribute value pair /// </summary> /// <param name="objectType">The object type to query</param> /// <param name="attributeName">The name of the attribute to query</param> /// <param name="comparisonOperator">The operator used to compare the attribute and value</param> /// <param name="attributeValue">The value of the attribute to query</param> /// <returns>An XPath query string</returns> public static string CreateFilter(string objectType, string attributeName, ComparisonOperator comparisonOperator, object attributeValue) { AttributeValuePairCollection dictionary = new AttributeValuePairCollection(); dictionary.Add(attributeName, attributeValue); return(XPathFilterBuilder.CreateFilter(objectType, dictionary, comparisonOperator, GroupOperator.And)); }
/// <summary> /// Creates an XPath filter for the specified object type and attribute/value pairs. Multiple pairs are joined with an 'and' operator /// </summary> /// <param name="objectType">The object type to query</param> /// <param name="keyValuePairs">The list to attribute and value pairs to query for</param> /// <param name="valueComparisonOperator">The operator used to compare the attribute and value pairs</param> /// <param name="groupOperator">The operator to use to join the attribute value pair comparisons together</param> /// <returns>An XPath query string</returns> public static string CreateFilter(string objectType, AttributeValuePairCollection keyValuePairs, ComparisonOperator valueComparisonOperator, GroupOperator groupOperator) { return(XPathFilterBuilder.CreateFilter(objectType, new XPathQueryGroup(groupOperator, keyValuePairs, valueComparisonOperator))); }
/// <summary> /// Creates a filter using the specified query objects /// </summary> /// <param name="objectType">The object type to query</param> /// <param name="queryOperator">The operator used to compare the query elements</param> /// <param name="queries">The query elements</param> /// <returns>An XPath query string</returns> internal static string CreateFilter(string objectType, GroupOperator queryOperator, params IXPathQueryObject[] queries) { return(XPathFilterBuilder.CreateFilter(objectType, queryOperator, (IEnumerable <IXPathQueryObject>)queries)); }