using System; using System.Collections.Generic; using System.Xml.XPath; using Examine.Search; using Umbraco.Core; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Xml; namespace Umbraco.Web { using Examine = global::Examine; /// /// Query methods used for accessing strongly typed content in templates /// public interface IPublishedContentQuery { IPublishedContent Content(int id); IPublishedContent Content(Guid id); IPublishedContent Content(Udi id); IPublishedContent ContentSingleAtXPath(string xpath, params XPathVariable[] vars); IEnumerable Content(IEnumerable ids); IEnumerable Content(IEnumerable ids); IEnumerable ContentAtXPath(string xpath, params XPathVariable[] vars); IEnumerable ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars); IEnumerable ContentAtRoot(); IPublishedContent Media(int id); IPublishedContent Media(Guid id); IPublishedContent Media(Udi id); IEnumerable Media(IEnumerable ids); IEnumerable Media(IEnumerable ids); IEnumerable MediaAtRoot(); /// /// Searches content. /// /// Term to search. /// Optional culture. /// Optional index name. /// /// When the is not specified, all cultures are searched. /// While enumerating results, the ambient culture is changed to be the searched culture. /// IEnumerable Search(string term, string culture = null, string indexName = null); /// /// Searches content. /// /// Term to search. /// Numbers of items to skip. /// Numbers of items to return. /// Total number of matching items. /// Optional culture. /// Optional index name. /// /// When the is not specified, all cultures are searched. /// While enumerating results, the ambient culture is changed to be the searched culture. /// IEnumerable Search(string term, int skip, int take, out long totalRecords, string culture = null, string indexName = null); /// /// Executes the query and converts the results to PublishedSearchResult. /// /// /// While enumerating results, the ambient culture is changed to be the searched culture. /// IEnumerable Search(IQueryExecutor query); /// /// Executes the query and converts the results to PublishedSearchResult. /// /// /// While enumerating results, the ambient culture is changed to be the searched culture. /// IEnumerable Search(IQueryExecutor query, int skip, int take, out long totalRecords); } }