コード例 #1
0
        public Result <HomePageQueryResponse> Execute(HomePageQuery query)
        {
            var result = GetFirstPageWithNodeAliasPath(HomePageProvider.GetHomePages(), query);

            if (result.IsFailure)
            {
                return(Result.Failure <HomePageQueryResponse>(result.Error));
            }

            var node = result.Value;

            return(Result.Success(new HomePageQueryResponse(
                                      node.Fields.HeaderText,
                                      node.Fields.FooterTitle,
                                      node.Fields.FooterText)));
        }
コード例 #2
0
 public object[] ItemNameParts(HomePageQuery query) => ItemNameParts(nameof(HomePageQuery), query.NodeAliasPath);
コード例 #3
0
 public string[] DependencyKeys(HomePageQuery query, Result <HomePageQueryResponse> result) =>
 new[] { FluentCacheKey.ForPage().OfSite(Context.SiteName).WithAliasPath(query.NodeAliasPath) };