本文整理汇总了C#中IArticleService类的典型用法代码示例。如果您正苦于以下问题:C# IArticleService类的具体用法?C# IArticleService怎么用?C# IArticleService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IArticleService类属于命名空间,在下文中一共展示了IArticleService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetArticleGroupBreadCrumb
public static IList<ArticleGroup> GetArticleGroupBreadCrumb(this ArticleGroup articleGroup,
IArticleService articleService,
bool showHidden = false)
{
if (articleGroup == null)
throw new ArgumentNullException("articleGroup");
var result = new List<ArticleGroup>();
//used to prevent circular references
var alreadyProcessedArticleGroupIds = new List<int>() { };
while (articleGroup != null && //not null
!articleGroup.Deleted && //not deleted
(showHidden || articleGroup.Published) && //published
!alreadyProcessedArticleGroupIds.Contains(articleGroup.Id)) //prevent circular references
{
result.Add(articleGroup);
alreadyProcessedArticleGroupIds.Add(articleGroup.Id);
articleGroup = articleService.GetArticleGroupById(articleGroup.ParentGroupId);
}
result.Reverse();
return result;
}
示例2: ArticleController
public ArticleController(IArticleService _articleService, IRequestCacheService _requestCacheService,
ISitemapService _sitemapService)
{
articleService = _articleService;
requestCacheService = _requestCacheService;
sitemapService = _sitemapService;
}
示例3: ArticleController
public ArticleController(ISimpleAccountManager simpleAccount, IArticleService articleService, IHelperServices helperServices)
: base(simpleAccount, articleService)
{
_simpleAccount = simpleAccount;
_articleService = articleService;
_helperServices = helperServices;
}
示例4: GetFormattedBreadCrumb
public static string GetFormattedBreadCrumb(this ArticleGroup category,
IArticleService articleService,
string separator = ">>")
{
if (category == null)
throw new ArgumentNullException("category");
string result = string.Empty;
//used to prevent circular references
var alreadyProcessedArticleGroupIds = new List<int>() { };
while (category != null && //not null
!category.Deleted && //not deleted
!alreadyProcessedArticleGroupIds.Contains(category.Id)) //prevent circular references
{
if (String.IsNullOrEmpty(result))
{
result = category.Name;
}
else
{
result = string.Format("{0} {1} {2}", category.Name, separator, result);
}
alreadyProcessedArticleGroupIds.Add(category.Id);
category = articleService.GetArticleGroupById(category.ParentGroupId);
}
return result;
}
示例5: ArticleController
public ArticleController(IBlogService blogService, IArticleService articleService, ITagService tagService, ICommentService commentService)
{
_blogService = blogService;
_articleService = articleService;
_tagService = tagService;
_commentService = commentService;
}
示例6: ArticleController
public ArticleController(IArticleService articleService, IRubricService rubricService, IImageService imageService, ITagService tagService)
{
this.articleService = articleService;
this.rubricService = rubricService;
this.imageService = imageService;
this.tagService = tagService;
}
示例7: ArticleController
public ArticleController(IArticleService articleService, IActicleCommentService acticleCommentService, IReportService reportService, IConfigInfoService configInfoService)
{
_articleService = articleService;
_acticleCommentService = acticleCommentService;
_reportService = reportService;
_configInfoService = configInfoService;
}
示例8: GetDisplayModel
public PictureGalleryDisplayModel GetDisplayModel(string id, IArticleService articleService)
{
var pics =
pictureDataProvider.PicturesForGallery(id)
.OrderBy(p => p.Sort)
.ThenBy(p => p.rating)
.ThenBy(p => p.TakenOn)
.Select(p =>
new PictureDisplayModel()
{
Author = p.Author,
FDirectory = p.fDirectory,
FName = p.fName,
Gallery = p.Gallery,
Height = p.height,
Wdith = p.width,
ThumbFBName = p.smallFName,
DscSI = p.DscSI,
DscEN = p.DscEN,
PicID = p.PicID,
Rating = p.rating
}).ToList();
var article = articleService.GetByCode(id, HttpContext.Current.Language());
var gal = new PictureGalleryDisplayModel(id, article != null ? article.Title : "",
article != null ? article.Description : "", pics, article != null ? article.EventFrom : null, true);
return gal;
}
示例9: HomeController
public HomeController(IQuickLinkService quickLinkService, IUnitOfWorkAsync unitOfWork, IArticleService articleService, IArticleCategoryService articleCategoryService)
{
this.quickLinkService = quickLinkService;
this.articleService = articleService;
this.unitOfWork = unitOfWork;
this.articleCategoryService = articleCategoryService;
}
示例10: PictureController
public PictureController(IPictureDataProvider _pictureDataProvider, IArticleService _articleService, IGalleryService _galleryService, IThumbnailGeneratorService _thumbnailGenerator)
{
pictureDataProvider = _pictureDataProvider;
articleService = _articleService;
this._galleryService = _galleryService;
this._thumbnailGenerator = _thumbnailGenerator;
}
示例11: HelpController
public HelpController(
IArticleService _ArticleService,
IArticleCateService _ArticleCateService
)
{
ArticleService = _ArticleService;
ArticleCateService = _ArticleCateService;
}
示例12: BuildArticleService
public static IArticleService BuildArticleService()
{
if (article_Service == null)
{
article_Service = new ArticelService();
}
return article_Service;
}
示例13: SidebarController
public SidebarController(IUserService userService, IArticleService articleService, ICategoryService categoryService, ICommentService commentService, ISettingService settionService)
{
_articleService = articleService;
_categoryService = categoryService;
_settionService = settionService;
_commentService = commentService;
_userService = userService;
}
示例14: CommentService
public CommentService(IArticleService articleService, ICommentRepository commentRepository, ISessionManager sessionManger, IRoleService roleService, ISettingService settiongService)
{
_articleService = articleService;
_commentRepository = commentRepository;
_sessionManager = sessionManger;
_roleService = roleService;
_settiongService = settiongService;
}
示例15: ArticleController
public ArticleController(IUserService service, IBlogService blogService,
IArticleService articleService, ICommentService commentService)
{
_userService = service;
_blogService = blogService;
_articleService = articleService;
_commentService = commentService;
}