• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IArticleService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IArticleService的典型用法代码示例。如果您正苦于以下问题:C# IArticleService类的具体用法?C# IArticleService怎么用?C# IArticleService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IArticleService类属于命名空间,在下文中一共展示了IArticleService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: HomeController

 public HomeController(IUserService userService, IRoleService roleService, ICommentService commentService, IBlogService blogService, IArticleService articleService)
 {
     this.userService = userService;
     this.roleService = roleService;
     this.commentService = commentService;
     this.blogService = blogService;
     this.articleService = articleService;
 }
开发者ID:f-acepalm,项目名称:Blog,代码行数:8,代码来源:HomeController.cs


示例17: HomeController

 public HomeController(IMessageService messageService, IApplicationUserManager userManager, IArticleService ArticleService, ITeacherService TeacherService, IArticleEvaluationService ArticleEvaluation)
 {
     _TeacherService = TeacherService;
     _ArticleEvaluationService = ArticleEvaluation;
     _ArticleService = ArticleService;
     _userManager = userManager;
     _messageService = messageService;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:8,代码来源:HomeController.cs


示例18: SearchController

 public SearchController(IArticleService articleService, ITagRepository tagRepository,
     IBlogService blogService, IUserService userService)
 {
     _articleService = articleService;
     _tagRepository = tagRepository;
     _blogService = blogService;
     _userService = userService;
 }
开发者ID:opolkosergey,项目名称:Blog.ASP.Net.Opolko,代码行数:8,代码来源:SearchController.cs


示例19: TransactionalMailSendingService

 public TransactionalMailSendingService(ISettingsProvider settingsProvider, IMailAccountsService mailAccountsService, IArticleService articleService, IMailSendingUtilsService mailSendingUtils, ISiteTestingService testingService)
 {
     _settingsProvider = settingsProvider;
     _mailAccountsService = mailAccountsService;
     _articleService = articleService;
     _mailSendingUtils = mailSendingUtils;
     _testingService = testingService;
 }
开发者ID:primozkrajnik,项目名称:100Tango,代码行数:8,代码来源:TransactionalMailSendingService.cs


示例20: HomeController

        //public HomeController() { }

        public HomeController(IOfficeLocationService officeLocationService, ITransportService transportService, IArticleService articleService) 
        {
            _transportService = transportService;
            _officeLocationService = officeLocationService;
            _articleService = articleService;

            //Enforce.NotNull(() => officeLocationService);
        }
开发者ID:Statoil,项目名称:BusAtStatoil,代码行数:10,代码来源:HomeController.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAssembly类代码示例发布时间:2022-05-24
下一篇:
C# IArrangedElement类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap