示例#1
0
        /// <summary>
        /// Creates a filter that dereferences a matching expression, and returns the resulting values from the referenced attribute
        /// </summary>
        /// <param name="searchObjectType">The object type to query</param>
        /// <param name="searchAttributeName">The name of the attribute to query</param>
        /// <param name="searchAttributeValue">The value of the attribute to query</param>
        /// <param name="referenceAttributeName">The name of the attribute to dereference</param>
        /// <returns>An XPath query string</returns>
        public static string CreateDereferenceFilter(string searchObjectType, string searchAttributeName, object searchAttributeValue, string referenceAttributeName)
        {
            XPathQuery predicate = new XPathQuery(searchAttributeName, ComparisonOperator.Equals, searchAttributeValue);

            return(XPathFilterBuilder.CreateDereferenceFilter(searchObjectType, predicate, referenceAttributeName));
        }
示例#2
0
        /// <summary>
        /// Creates a filter that dereferences a matching expression, and returns the resulting values from the referenced attribute
        /// </summary>
        /// <param name="searchObjectType">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>
        /// <param name="referenceAttributeName">The name of the attribute used to dereference the expression</param>
        /// <returns>An XPath query string</returns>
        public static string CreateDereferenceFilter(string searchObjectType, Dictionary <string, object> keyValuePairs, ComparisonOperator valueComparisonOperator, GroupOperator groupOperator, string referenceAttributeName)
        {
            XPathQueryGroup predicate = new XPathQueryGroup(groupOperator, keyValuePairs, valueComparisonOperator);

            return(XPathFilterBuilder.CreateDereferenceFilter(searchObjectType, predicate, referenceAttributeName));
        }