2015-02-18 17:14:55 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2013-11-07 17:16:22 +01:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Xml.XPath;
|
|
|
|
|
|
using Umbraco.Core;
|
|
|
|
|
|
using Umbraco.Core.Dynamics;
|
|
|
|
|
|
using Umbraco.Core.Models;
|
2016-05-18 23:34:56 +02:00
|
|
|
|
using Umbraco.Core.Plugins;
|
2013-11-07 17:16:22 +01:00
|
|
|
|
using Umbraco.Core.Xml;
|
|
|
|
|
|
using Umbraco.Web.Models;
|
|
|
|
|
|
using Umbraco.Web.PublishedCache;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A class used to query for published content, media items
|
|
|
|
|
|
/// </summary>
|
2015-02-18 17:14:55 +01:00
|
|
|
|
public class PublishedContentQuery : ITypedPublishedContentQuery, IDynamicPublishedContentQuery
|
2013-11-07 17:16:22 +01:00
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
private readonly ITypedPublishedContentQuery _typedContentQuery;
|
|
|
|
|
|
private readonly IDynamicPublishedContentQuery _dynamicContentQuery;
|
2013-11-07 17:16:22 +01:00
|
|
|
|
private readonly ContextualPublishedContentCache _contentCache;
|
|
|
|
|
|
private readonly ContextualPublishedMediaCache _mediaCache;
|
|
|
|
|
|
|
2015-02-18 17:14:55 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Constructor used to return results from the caches
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="contentCache"></param>
|
|
|
|
|
|
/// <param name="mediaCache"></param>
|
2013-11-07 17:16:22 +01:00
|
|
|
|
public PublishedContentQuery(ContextualPublishedContentCache contentCache, ContextualPublishedMediaCache mediaCache)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
if (contentCache == null) throw new ArgumentNullException("contentCache");
|
|
|
|
|
|
if (mediaCache == null) throw new ArgumentNullException("mediaCache");
|
2013-11-07 17:16:22 +01:00
|
|
|
|
_contentCache = contentCache;
|
|
|
|
|
|
_mediaCache = mediaCache;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-02-18 17:14:55 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Constructor used to wrap the ITypedPublishedContentQuery and IDynamicPublishedContentQuery objects passed in
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="typedContentQuery"></param>
|
|
|
|
|
|
/// <param name="dynamicContentQuery"></param>
|
|
|
|
|
|
public PublishedContentQuery(ITypedPublishedContentQuery typedContentQuery, IDynamicPublishedContentQuery dynamicContentQuery)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (typedContentQuery == null) throw new ArgumentNullException("typedContentQuery");
|
|
|
|
|
|
if (dynamicContentQuery == null) throw new ArgumentNullException("dynamicContentQuery");
|
|
|
|
|
|
_typedContentQuery = typedContentQuery;
|
|
|
|
|
|
_dynamicContentQuery = dynamicContentQuery;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-11-07 17:16:22 +01:00
|
|
|
|
#region Content
|
|
|
|
|
|
|
|
|
|
|
|
public IPublishedContent TypedContent(int id)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentById(id, _contentCache)
|
|
|
|
|
|
: _typedContentQuery.TypedContent(id);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IPublishedContent TypedContentSingleAtXPath(string xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentByXPath(xpath, vars, _contentCache)
|
|
|
|
|
|
: _typedContentQuery.TypedContentSingleAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedContent(IEnumerable<int> ids)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentsByIds(_contentCache, ids)
|
|
|
|
|
|
: _typedContentQuery.TypedContent(ids);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedContentAtXPath(string xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentsByXPath(xpath, vars, _contentCache)
|
|
|
|
|
|
: _typedContentQuery.TypedContentAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedContentAtXPath(XPathExpression xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentsByXPath(xpath, vars, _contentCache)
|
|
|
|
|
|
: _typedContentQuery.TypedContentAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedContentAtRoot()
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentsAtRoot(_contentCache)
|
|
|
|
|
|
: _typedContentQuery.TypedContentAtRoot();
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic Content(int id)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentById(id, _contentCache, DynamicNull.Null)
|
|
|
|
|
|
: _dynamicContentQuery.Content(id);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic ContentSingleAtXPath(string xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentByXPath(xpath, vars, _contentCache, DynamicNull.Null)
|
|
|
|
|
|
: _dynamicContentQuery.ContentSingleAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic ContentSingleAtXPath(XPathExpression xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentByXPath(xpath, vars, _contentCache, DynamicNull.Null)
|
|
|
|
|
|
: _dynamicContentQuery.ContentSingleAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic Content(IEnumerable<int> ids)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentByIds(_contentCache, ids.ToArray())
|
|
|
|
|
|
: _dynamicContentQuery.Content(ids);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic ContentAtXPath(string xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentsByXPath(xpath, vars, _contentCache)
|
|
|
|
|
|
: _dynamicContentQuery.ContentAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentsByXPath(xpath, vars, _contentCache)
|
|
|
|
|
|
: _dynamicContentQuery.ContentAtXPath(xpath, vars);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic ContentAtRoot()
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentsAtRoot(_contentCache)
|
|
|
|
|
|
: _dynamicContentQuery.ContentAtRoot();
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Media
|
|
|
|
|
|
|
|
|
|
|
|
public IPublishedContent TypedMedia(int id)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentById(id, _mediaCache)
|
|
|
|
|
|
: _typedContentQuery.TypedMedia(id);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedMedia(IEnumerable<int> ids)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentsByIds(_mediaCache, ids)
|
|
|
|
|
|
: _typedContentQuery.TypedMedia(ids);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedMediaAtRoot()
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _typedContentQuery == null
|
|
|
|
|
|
? TypedDocumentsAtRoot(_mediaCache)
|
|
|
|
|
|
: _typedContentQuery.TypedMediaAtRoot();
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic Media(int id)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentById(id, _mediaCache, DynamicNull.Null)
|
|
|
|
|
|
: _dynamicContentQuery.Media(id);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic Media(IEnumerable<int> ids)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentByIds(_mediaCache, ids)
|
|
|
|
|
|
: _dynamicContentQuery.Media(ids);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public dynamic MediaAtRoot()
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? DocumentsAtRoot(_mediaCache)
|
|
|
|
|
|
: _dynamicContentQuery.MediaAtRoot();
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Used by Content/Media
|
|
|
|
|
|
|
|
|
|
|
|
private IPublishedContent TypedDocumentById(int id, ContextualPublishedCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetById(id);
|
|
|
|
|
|
return doc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IPublishedContent TypedDocumentByXPath(string xpath, XPathVariable[] vars, ContextualPublishedContentCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetSingleByXPath(xpath, vars);
|
|
|
|
|
|
return doc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//NOTE: Not used?
|
|
|
|
|
|
//private IPublishedContent TypedDocumentByXPath(XPathExpression xpath, XPathVariable[] vars, ContextualPublishedContentCache cache)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// var doc = cache.GetSingleByXPath(xpath, vars);
|
|
|
|
|
|
// return doc;
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
2014-11-18 12:05:03 +11:00
|
|
|
|
private IEnumerable<IPublishedContent> TypedDocumentsByIds(ContextualPublishedCache cache, IEnumerable<int> ids)
|
2013-11-07 17:16:22 +01:00
|
|
|
|
{
|
2015-09-04 10:42:56 +02:00
|
|
|
|
return ids.Select(eachId => TypedDocumentById(eachId, cache)).WhereNotNull();
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<IPublishedContent> TypedDocumentsByXPath(string xpath, XPathVariable[] vars, ContextualPublishedContentCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetByXPath(xpath, vars);
|
|
|
|
|
|
return doc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<IPublishedContent> TypedDocumentsByXPath(XPathExpression xpath, XPathVariable[] vars, ContextualPublishedContentCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetByXPath(xpath, vars);
|
|
|
|
|
|
return doc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<IPublishedContent> TypedDocumentsAtRoot(ContextualPublishedCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
return cache.GetAtRoot();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentById(int id, ContextualPublishedCache cache, object ifNotFound)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetById(id);
|
|
|
|
|
|
return doc == null
|
|
|
|
|
|
? ifNotFound
|
|
|
|
|
|
: new DynamicPublishedContent(doc).AsDynamic();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentByXPath(string xpath, XPathVariable[] vars, ContextualPublishedCache cache, object ifNotFound)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetSingleByXPath(xpath, vars);
|
|
|
|
|
|
return doc == null
|
|
|
|
|
|
? ifNotFound
|
|
|
|
|
|
: new DynamicPublishedContent(doc).AsDynamic();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentByXPath(XPathExpression xpath, XPathVariable[] vars, ContextualPublishedCache cache, object ifNotFound)
|
|
|
|
|
|
{
|
|
|
|
|
|
var doc = cache.GetSingleByXPath(xpath, vars);
|
|
|
|
|
|
return doc == null
|
|
|
|
|
|
? ifNotFound
|
|
|
|
|
|
: new DynamicPublishedContent(doc).AsDynamic();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentByIds(ContextualPublishedCache cache, IEnumerable<int> ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
var dNull = DynamicNull.Null;
|
|
|
|
|
|
var nodes = ids.Select(eachId => DocumentById(eachId, cache, dNull))
|
|
|
|
|
|
.Where(x => TypeHelper.IsTypeAssignableFrom<DynamicNull>(x) == false)
|
|
|
|
|
|
.Cast<DynamicPublishedContent>();
|
|
|
|
|
|
return new DynamicPublishedContentList(nodes);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentsByXPath(string xpath, XPathVariable[] vars, ContextualPublishedCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new DynamicPublishedContentList(
|
|
|
|
|
|
cache.GetByXPath(xpath, vars)
|
|
|
|
|
|
.Select(publishedContent => new DynamicPublishedContent(publishedContent))
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentsByXPath(XPathExpression xpath, XPathVariable[] vars, ContextualPublishedCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new DynamicPublishedContentList(
|
|
|
|
|
|
cache.GetByXPath(xpath, vars)
|
|
|
|
|
|
.Select(publishedContent => new DynamicPublishedContent(publishedContent))
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private dynamic DocumentsAtRoot(ContextualPublishedCache cache)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new DynamicPublishedContentList(
|
|
|
|
|
|
cache.GetAtRoot()
|
|
|
|
|
|
.Select(publishedContent => new DynamicPublishedContent(publishedContent))
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Search
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Searches content
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="term"></param>
|
|
|
|
|
|
/// <param name="useWildCards"></param>
|
|
|
|
|
|
/// <param name="searchProvider"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public dynamic Search(string term, bool useWildCards = true, string searchProvider = null)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? new DynamicPublishedContentList(
|
|
|
|
|
|
TypedSearch(term, useWildCards, searchProvider))
|
|
|
|
|
|
: _dynamicContentQuery.Search(term, useWildCards, searchProvider);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Searhes content
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="criteria"></param>
|
|
|
|
|
|
/// <param name="searchProvider"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public dynamic Search(Examine.SearchCriteria.ISearchCriteria criteria, Examine.Providers.BaseSearchProvider searchProvider = null)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
return _dynamicContentQuery == null
|
|
|
|
|
|
? new DynamicPublishedContentList(
|
|
|
|
|
|
TypedSearch(criteria, searchProvider))
|
|
|
|
|
|
: _dynamicContentQuery.Search(criteria, searchProvider);
|
2013-11-07 17:16:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Searches content
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="term"></param>
|
|
|
|
|
|
/// <param name="useWildCards"></param>
|
|
|
|
|
|
/// <param name="searchProvider"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedSearch(string term, bool useWildCards = true, string searchProvider = null)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
if (_typedContentQuery != null) return _typedContentQuery.TypedSearch(term, useWildCards, searchProvider);
|
|
|
|
|
|
|
2013-11-07 17:16:22 +01:00
|
|
|
|
var searcher = Examine.ExamineManager.Instance.DefaultSearchProvider;
|
|
|
|
|
|
if (string.IsNullOrEmpty(searchProvider) == false)
|
|
|
|
|
|
searcher = Examine.ExamineManager.Instance.SearchProviderCollection[searchProvider];
|
|
|
|
|
|
|
|
|
|
|
|
var results = searcher.Search(term, useWildCards);
|
|
|
|
|
|
return results.ConvertSearchResultToPublishedContent(_contentCache);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Searhes content
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="criteria"></param>
|
|
|
|
|
|
/// <param name="searchProvider"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public IEnumerable<IPublishedContent> TypedSearch(Examine.SearchCriteria.ISearchCriteria criteria, Examine.Providers.BaseSearchProvider searchProvider = null)
|
|
|
|
|
|
{
|
2015-02-18 17:14:55 +01:00
|
|
|
|
if (_typedContentQuery != null) return _typedContentQuery.TypedSearch(criteria, searchProvider);
|
|
|
|
|
|
|
2013-11-07 17:16:22 +01:00
|
|
|
|
var s = Examine.ExamineManager.Instance.DefaultSearchProvider;
|
|
|
|
|
|
if (searchProvider != null)
|
|
|
|
|
|
s = searchProvider;
|
|
|
|
|
|
|
|
|
|
|
|
var results = s.Search(criteria);
|
|
|
|
|
|
return results.ConvertSearchResultToPublishedContent(_contentCache);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
2013-10-24 12:50:43 +11:00
|
|
|
|
}
|