Пример #1
0
        private IResourceItem BuildResource(ISearchResult searchResult)
        {
            var resourceType = searchResult.GetValues("__NodeTypeAlias").FirstOrDefault();
            var item         = ResourceFactoryProvider.GetResourceFactory(resourceType, this.Umbraco, this.Services.ContentService, this.CultureName).BuildResource(searchResult);

            return(item);
        }
Пример #2
0
        private IEnumerable <IResourceItemBase> BuildResourceList(ISearchResults searchResults)
        {
            var items          = new List <IResourceItemBase>();
            var groupedResults = searchResults.GroupBy(GetProviderName);

            foreach (var group in groupedResults)
            {
                items.AddRange(ResourceFactoryProvider.GetResourceFactory(group.Key, this.Umbraco, this.Services.ContentService, this.CultureName).BuildResourcesList(group.AsEnumerable()));
            }

            return(items);
        }
Пример #3
0
        private IContent BuildContent(JToken putValue, IPublishedContent content)
        {
            var contentNode = this.Services.ContentService.GetById(content.Id);

            return(ResourceFactoryProvider.GetResourceFactory(content.ContentType.Alias, this.Umbraco, this.Services.ContentService, this.CultureName).BuildContent(putValue, contentNode));
        }
Пример #4
0
 private IContent BuildContent(JToken putValue, string resourceType, int categoryNodeId)
 {
     return(ResourceFactoryProvider.GetResourceFactory(resourceType, this.Umbraco, this.Services.ContentService, this.CultureName).BuildContent(putValue, resourceType, categoryNodeId));
 }