当前位置: 首页>>代码示例>>C#>>正文


C# IArticleService类代码示例

本文整理汇总了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;
        }
开发者ID:phatnguyen81,项目名称:vlsaomai,代码行数:26,代码来源:ArticleGroupExtensions.cs

示例2: ArticleController

 public ArticleController(IArticleService _articleService, IRequestCacheService _requestCacheService,
     ISitemapService _sitemapService)
 {
     articleService = _articleService;
     requestCacheService = _requestCacheService;
     sitemapService = _sitemapService;
 }
开发者ID:primozkrajnik,项目名称:100Tango,代码行数:7,代码来源:ArticleController.cs

示例3: ArticleController

 public ArticleController(ISimpleAccountManager simpleAccount, IArticleService articleService, IHelperServices helperServices)
     : base(simpleAccount, articleService)
 {
     _simpleAccount = simpleAccount;
     _articleService = articleService;
     _helperServices = helperServices;
 }
开发者ID:haojunsun,项目名称:DevelopmentCenter,代码行数:7,代码来源:ArticleController.cs

示例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;
        }
开发者ID:phatnguyen81,项目名称:vlsaomai,代码行数:32,代码来源:ArticleGroupExtensions.cs

示例5: ArticleController

 public ArticleController(IBlogService blogService, IArticleService articleService, ITagService tagService, ICommentService commentService)
 {
     _blogService = blogService;
     _articleService = articleService;
     _tagService = tagService;
     _commentService = commentService;
 }
开发者ID:gewandt,项目名称:PersonalBlog,代码行数:7,代码来源:ArticleController.cs

示例6: ArticleController

 public ArticleController(IArticleService articleService, IRubricService rubricService, IImageService imageService, ITagService tagService)
 {
     this.articleService = articleService;
     this.rubricService = rubricService;
     this.imageService = imageService;
     this.tagService = tagService;
 }
开发者ID:deyantodorov,项目名称:Healthy,代码行数:7,代码来源:ArticleController.cs

示例7: ArticleController

 public ArticleController(IArticleService articleService, IActicleCommentService acticleCommentService, IReportService reportService, IConfigInfoService configInfoService)
 {
     _articleService = articleService;
     _acticleCommentService = acticleCommentService;
     _reportService = reportService;
     _configInfoService = configInfoService;
 }
开发者ID:NameIsBad,项目名称:BoredNew,代码行数:7,代码来源:ArticleController.cs

示例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;
        }
开发者ID:primozkrajnik,项目名称:100Tango,代码行数:28,代码来源:GalleryService.cs

示例9: HomeController

 public HomeController(IQuickLinkService quickLinkService, IUnitOfWorkAsync unitOfWork, IArticleService articleService, IArticleCategoryService articleCategoryService)
 {
     this.quickLinkService = quickLinkService;
     this.articleService = articleService;
     this.unitOfWork = unitOfWork;
     this.articleCategoryService = articleCategoryService;
 }
开发者ID:babak59,项目名称:forbiz,代码行数:7,代码来源:HomeController.cs

示例10: PictureController

 public PictureController(IPictureDataProvider _pictureDataProvider, IArticleService _articleService, IGalleryService _galleryService, IThumbnailGeneratorService _thumbnailGenerator)
 {
     pictureDataProvider = _pictureDataProvider;
     articleService = _articleService;
     this._galleryService = _galleryService;
     this._thumbnailGenerator = _thumbnailGenerator;
 }
开发者ID:primozkrajnik,项目名称:100Tango,代码行数:7,代码来源:PictureController.cs

示例11: HelpController

 public HelpController(
      IArticleService _ArticleService,
      IArticleCateService _ArticleCateService
   )
 {
     ArticleService = _ArticleService;
     ArticleCateService = _ArticleCateService;
 }
开发者ID:navy235,项目名称:WebSite,代码行数:8,代码来源:HelpController.cs

示例12: BuildArticleService

 public static IArticleService BuildArticleService()
 {
     if (article_Service == null)
     {
         article_Service = new ArticelService();
     }
     return article_Service;
 }
开发者ID:Wright52,项目名称:PublicWelfare,代码行数:8,代码来源:ServiceBuilder.cs

示例13: SidebarController

 public SidebarController(IUserService userService, IArticleService articleService, ICategoryService categoryService, ICommentService commentService, ISettingService settionService)
 {
     _articleService = articleService;
     _categoryService = categoryService;
     _settionService = settionService;
     _commentService = commentService;
     _userService = userService;
 }
开发者ID:miandai,项目名称:.Net-MVC-Blog,代码行数:8,代码来源:SidebarController.cs

示例14: CommentService

 public CommentService(IArticleService articleService, ICommentRepository commentRepository, ISessionManager sessionManger, IRoleService roleService, ISettingService settiongService)
 {
     _articleService = articleService;
     _commentRepository = commentRepository;
     _sessionManager = sessionManger;
     _roleService = roleService;
     _settiongService = settiongService;
 }
开发者ID:miandai,项目名称:.Net-MVC-Blog,代码行数:8,代码来源:CommentService.cs

示例15: ArticleController

 public ArticleController(IUserService service, IBlogService blogService,
     IArticleService articleService, ICommentService commentService)
 {
     _userService = service;
     _blogService = blogService;
     _articleService = articleService;
     _commentService = commentService;
 }
开发者ID:opolkosergey,项目名称:Blog.ASP.Net.Opolko,代码行数:8,代码来源:ArticleController.cs


注:本文中的IArticleService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。