public override object PrepareViewModel()
        {
            var itemList = _nccTagService.LoadTagCloud();

            if (itemList != null && itemList.Count > 0)
            {
                TagCloudViewModel model = new TagCloudViewModel();
                model.ShowTagHasPost = ShowTagHasPost;
                model.ShowPostCount  = ShowPostCount;
                model.ItemList       = itemList;
                return(model);
            }

            return("");
        }
示例#2
0
        public override string RenderBody()
        {
            var itemList = _nccTagService.LoadTagCloud();

            if (itemList != null && itemList.Count > 0)
            {
                TagCloudViewModel item = new TagCloudViewModel();
                item.ShowTagHasPost = ShowTagHasPost;
                item.ShowPostCount  = ShowPostCount;
                item.ItemList       = itemList;
                var body = _viewRenderService.RenderToStringAsync <BlogController>(ViewFileName, item).Result;
                return(body);
            }

            return("");
        }