Example #1
0
        /// <summary>
        /// Parses a <paramref name="orderBy "/> clause on the given <paramref name="elementType"/>, binding
        /// the text into semantic nodes using the provided <paramref name="model"/>.
        /// </summary>
        /// <param name="orderBy">String representation of the orderby expression.</param>
        /// <param name="model">Model to use for metadata binding.</param>
        /// <param name="elementType">Type that the orderby clause refers to.</param>
        /// <param name="entitySet">EntitySet that the elements beign filtered are from.</param>
        /// <returns>A <see cref="OrderByClause"/> representing the metadata bound orderby expression.</returns>
        public static OrderByClause ParseOrderBy(string orderBy, IEdmModel model, IEdmType elementType, IEdmEntitySet entitySet)
        {
            ODataUriParser parser = new ODataUriParser(model, null);

            return(parser.ParseOrderBy(orderBy, elementType, entitySet));
        }
Example #2
0
        /// <summary>
        /// Parses a <paramref name="filter"/> clause on the given <paramref name="elementType"/>, binding
        /// the text into semantic nodes using the provided <paramref name="model"/>.
        /// </summary>
        /// <param name="filter">String representation of the filter expression.</param>
        /// <param name="model">Model to use for metadata binding.</param>
        /// <param name="elementType">Type that the filter clause refers to.</param>
        /// <param name="entitySet">EntitySet that the elements beign filtered are from.</param>
        /// <returns>A <see cref="FilterClause"/> representing the metadata bound filter expression.</returns>
        public static FilterClause ParseFilter(string filter, IEdmModel model, IEdmType elementType, IEdmEntitySet entitySet)
        {
            ODataUriParser parser = new ODataUriParser(model, null);

            return(parser.ParseFilter(filter, elementType, entitySet));
        }