コード例 #1
0
        public static IQueryable <Content> Children(this Content content, IHiveManager hiveManager)
        {
            var childIds = content.AllChildIds();

            // Not exactly sure why we need to do it this way, but when done the other way, it doesn't trigger the content type mapper
            // and therfore looses it's sort order
            return(hiveManager.Query <TypedEntity, IContentStore>().OfRevisionType(FixedStatusTypes.Published).InIds(childIds)
                   .ToList().Select(x => hiveManager.FrameworkContext.TypeMappers.Map <Content>(x)).AsQueryable());
            //return hiveManager.QueryContent().OfRevisionType(FixedStatusTypes.Published).InIds(childIds);
        }
コード例 #2
0
 public static IQueryable <T> QueryContent <T>(this IHiveManager hiveManager)
     where T : class, IReferenceByHiveId
 {
     return(hiveManager.Query <T, IContentStore>());
 }
コード例 #3
0
 public DynamicContentList(HiveId sourceId, IHiveManager hiveManager, object defaultValueIfNull, IEnumerable <HiveId> containedIds)
     : this(sourceId, hiveManager, defaultValueIfNull, containedIds, hiveManager.Query <TypedEntity, IContentStore>().OfRevisionType(FixedStatusTypes.Published).InIds(containedIds.ToArray()))
 {
 }