예제 #1
0
        public IEnumerable <IPublishedContent> GetAtRoot(bool preview)
        {
            // because members are flat (not a tree) everything is at root
            // because we're loading everything... let's just not cache?
            var members = _memberService.GetAllMembers();

            return(members.Select(m => PublishedMember.Create(m, GetContentType(m.ContentTypeId), preview, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor)));
        }
예제 #2
0
 public IPublishedContent /*IPublishedMember*/ GetById(int memberId)
 {
     return(GetCacheItem(CacheKeys.MemberCacheMember("ById", _previewDefault, memberId), () =>
     {
         EnsureProvider();
         var member = _memberService.GetById(memberId);
         return member == null
                 ? null
                 : PublishedMember.Create(member, GetContentType(member.ContentTypeId), _previewDefault, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor);
     }));
 }
예제 #3
0
 private IPublishedContent /*IPublishedMember*/ GetById(IMember member, bool previewing)
 {
     return(GetCacheItem(CacheKeys.MemberCacheMember("ById", _previewDefault, member.Id), () =>
                         PublishedMember.Create(member, GetContentType(member.ContentTypeId), previewing, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor)));
 }
예제 #4
0
 public IPublishedContent /*IPublishedMember*/ GetByMember(IMember member)
 {
     return(PublishedMember.Create(member, GetContentType(member.ContentTypeId), _previewDefault, _publishedSnapshotAccessor, VariationContextAccessor, _umbracoContextAccessor));
 }