예제 #1
0
        private IBoardPostEntity LoadBareEntity(PostsTable table, PostStoreEntityType?entityType)
        {
            PostModelStoreBareEntity r  = IsOriginalPageSequence(entityType) ? new PostModelStoreBareEntityWithSequence() : new PostModelStoreBareEntity();
            BasicEntityInfo          bi = default(BasicEntityInfo);

            SetBareEntityData(table, r, ref bi);
            return(r);
        }
예제 #2
0
 private void SetBareEntityData(PostsTable.ViewValues.BareEntityLoadInfoView v, PostModelStoreBareEntity data, ref BasicEntityInfo bi)
 {
     LoadBasicInfo(v, ref bi);
     data.EntityType    = bi.entityType;
     data.Link          = bi.link;
     data.ParentLink    = bi.parentLink;
     data.Thumbnail     = ObjectSerializationService.Deserialize(v.Thumbnail) as IPostMediaWithSize;
     data.Subject       = v.Subject;
     data.StoreId       = bi.entityId;
     data.StoreParentId = bi.parentEntityId;
     if (data is IBoardPostEntityWithSequence2 s)
     {
         s.SetOnPageSequence(v.ThreadPreviewSequence ?? int.MaxValue);
     }
 }
예제 #3
0
 private void SetBareEntityData(PostsTable table, PostModelStoreBareEntity data, ref BasicEntityInfo bi)
 {
     SetBareEntityData(table.Views.BareEntityLoadInfoView.Fetch(), data, ref bi);
 }