public static object[] NamePartsFromQuery(IDocumentQueryContext context, string queryClassName) => new object[] { queryClassName, context.SiteName, $"preview:{context.IsPreviewEnabled}" };
public DocumentContextQueryHandler(IDocumentQueryContext context) { Guard.Against.Null(context, nameof(context)); Context = context; }
public DocumentByNodeAliasPathQueryHandler(IDocumentQueryContext context) { Guard.Against.Null(context, nameof(context)); this.context = context; }
public MarketingTagsContentQueryHandler(IDocumentQueryContext context) { Guard.Against.Null(context, nameof(context)); this.context = context; }
public static MultiDocumentQuery GetLatestSiteDocuments(this MultiDocumentQuery query, IDocumentQueryContext context) => query.LatestVersion(context.IsPreviewEnabled) .Published(!context.IsPreviewEnabled) .OnSite(context.SiteName) .CombineWithDefaultCulture();
/// <summary> /// Returns the <see cref="DocumentQuery"/> filtered by the latest publish version on the current site /// combined with the default culture, unless the request is in preview mode, which will return the latest document /// </summary> /// <typeparam name="TNode"></typeparam> /// <param name="query"></param> /// <param name="context"></param> /// <returns></returns> public static DocumentQuery <TNode> GetLatestSiteDocuments <TNode>(this DocumentQuery <TNode> query, IDocumentQueryContext context) where TNode : TreeNode, new() => query.LatestVersion(context.IsPreviewEnabled) .Published(!context.IsPreviewEnabled) .OnSite(context.SiteName) .CombineWithDefaultCulture();
public HomePageQueryHandler(IDocumentQueryContext context) : base(context) { }
public ContactUsPageQueryHandler(IDocumentQueryContext context) : base(context) { }