View Source
Class PublishedContentQuery
A class used to query for published content, media items
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public class PublishedContentQuery : IPublishedContentQuery2, IPublishedContentQuery
Constructors
View Source
PublishedContentQuery(IPublishedSnapshot, IVariationContextAccessor)
Declaration
[Obsolete("Use the constructor with all parameters instead")]
public PublishedContentQuery(IPublishedSnapshot publishedSnapshot, IVariationContextAccessor variationContextAccessor)
Parameters
View Source
PublishedContentQuery(IPublishedSnapshot, IVariationContextAccessor, IExamineManager)
Declaration
public PublishedContentQuery(IPublishedSnapshot publishedSnapshot, IVariationContextAccessor variationContextAccessor, IExamineManager examineManager)
Parameters
Methods
View Source
Content(IEnumerable<Guid>)
Declaration
public IEnumerable<IPublishedContent> Content(IEnumerable<Guid> ids)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
ids |
|
Returns
View Source
Content(IEnumerable<Int32>)
Declaration
public IEnumerable<IPublishedContent> Content(IEnumerable<int> ids)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Int32> |
ids |
|
Returns
View Source
Content(Guid)
Declaration
public IPublishedContent Content(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
Content(Int32)
Declaration
public IPublishedContent Content(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
Content(Udi)
Declaration
public IPublishedContent Content(Udi id)
Parameters
Type |
Name |
Description |
Udi |
id |
|
Returns
View Source
ContentAtRoot()
Declaration
public IEnumerable<IPublishedContent> ContentAtRoot()
Returns
View Source
ContentAtXPath(String, XPathVariable[])
Declaration
public IEnumerable<IPublishedContent> ContentAtXPath(string xpath, params XPathVariable[] vars)
Parameters
Returns
View Source
ContentAtXPath(XPathExpression, XPathVariable[])
Declaration
public IEnumerable<IPublishedContent> ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars)
Parameters
Type |
Name |
Description |
System.Xml.XPath.XPathExpression |
xpath |
|
XPathVariable[] |
vars |
|
Returns
View Source
ContentSingleAtXPath(String, XPathVariable[])
Declaration
public IPublishedContent ContentSingleAtXPath(string xpath, params XPathVariable[] vars)
Parameters
Returns
View Source
Media(IEnumerable<Guid>)
Declaration
public IEnumerable<IPublishedContent> Media(IEnumerable<Guid> ids)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
ids |
|
Returns
View Source
Media(IEnumerable<Int32>)
Declaration
public IEnumerable<IPublishedContent> Media(IEnumerable<int> ids)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Int32> |
ids |
|
Returns
View Source
Media(Guid)
Declaration
public IPublishedContent Media(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
Media(Int32)
Declaration
public IPublishedContent Media(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
Media(Udi)
Declaration
public IPublishedContent Media(Udi id)
Parameters
Type |
Name |
Description |
Udi |
id |
|
Returns
View Source
MediaAtRoot()
Declaration
public IEnumerable<IPublishedContent> MediaAtRoot()
Returns
View Source
Search(IQueryExecutor)
Declaration
public IEnumerable<PublishedSearchResult> Search(IQueryExecutor query)
Parameters
Type |
Name |
Description |
IQueryExecutor |
query |
The query.
|
Returns
View Source
Search(IQueryExecutor, Int32, Int32, out Int64)
Declaration
public IEnumerable<PublishedSearchResult> Search(IQueryExecutor query, int skip, int take, out long totalRecords)
Parameters
Type |
Name |
Description |
IQueryExecutor |
query |
The query.
|
System.Int32 |
skip |
The amount of results to skip.
|
System.Int32 |
take |
The amount of results to take/return.
|
System.Int64 |
totalRecords |
The total amount of records.
|
Returns
View Source
Search(String, Int32, Int32, out Int64, String, String)
Declaration
public IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = "ExternalIndex")
Parameters
Type |
Name |
Description |
System.String |
term |
The term to search.
|
System.Int32 |
skip |
The amount of results to skip.
|
System.Int32 |
take |
The amount of results to take/return.
|
System.Int64 |
totalRecords |
The total amount of records.
|
System.String |
culture |
The culture (defaults to a culture insensitive search).
|
System.String |
indexName |
The name of the index to search (defaults to ExternalIndexName).
|
Returns
View Source
Search(String, Int32, Int32, out Int64, String, String, ISet<String>)
Declaration
public IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = "ExternalIndex", ISet<string> loadedFields = null)
Parameters
Type |
Name |
Description |
System.String |
term |
The term to search.
|
System.Int32 |
skip |
The amount of results to skip.
|
System.Int32 |
take |
The amount of results to take/return.
|
System.Int64 |
totalRecords |
The total amount of records.
|
System.String |
culture |
The culture (defaults to a culture insensitive search).
|
System.String |
indexName |
The name of the index to search (defaults to ExternalIndexName).
|
System.Collections.Generic.ISet<System.String> |
loadedFields |
The fields to load in the results of the search (defaults to all fields loaded).
|
Returns
View Source
Search(String, String, String)
Declaration
public IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = "ExternalIndex")
Parameters
Type |
Name |
Description |
System.String |
term |
The term to search.
|
System.String |
culture |
The culture (defaults to a culture insensitive search).
|
System.String |
indexName |
The name of the index to search (defaults to ExternalIndexName).
|
Returns