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

C# IPostService类代码示例

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

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



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

示例1: AtomController

 public AtomController(IUserService userService, IPostService postService, ILogger logger, ISyndicationFeedService syndicationFeedService)
     : base(logger)
 {
     _userService = userService;
     _postService = postService;
     _syndicationFeedService = syndicationFeedService;
 }
开发者ID:kevinrjones,项目名称:Itsa,代码行数:7,代码来源:AtomController.cs


示例2: ShowPosts

 static void ShowPosts(IPostService postService)
 {
     foreach (var post in postService.GetAll())
     {
         System.Console.WriteLine(post.Url + " " + post.Time.Year + " " + String.Join(",", post.Tags.Select(t => t.Name)));
     }
 }
开发者ID:czogori,项目名称:Delicious,代码行数:7,代码来源:Program.cs


示例3: MembershipService

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context"></param>
 /// <param name="settingsService"> </param>
 /// <param name="emailService"> </param>
 /// <param name="localizationService"> </param>
 /// <param name="activityService"> </param>
 /// <param name="privateMessageService"> </param>
 /// <param name="membershipUserPointsService"> </param>
 /// <param name="topicNotificationService"> </param>
 /// <param name="voteService"> </param>
 /// <param name="badgeService"> </param>
 /// <param name="categoryNotificationService"> </param>
 /// <param name="loggingService"></param>
 /// <param name="uploadedFileService"></param>
 /// <param name="postService"></param>
 /// <param name="pollVoteService"></param>
 /// <param name="pollAnswerService"></param>
 /// <param name="pollService"></param>
 /// <param name="topicService"></param>
 /// <param name="favouriteService"></param>
 /// <param name="categoryService"></param>
 public MembershipService(IMVCForumContext context, ISettingsService settingsService,
     IEmailService emailService, ILocalizationService localizationService, IActivityService activityService,
     IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService,
     ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService,
     ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService,
     IPostService postService, IPollVoteService pollVoteService, IPollAnswerService pollAnswerService,
     IPollService pollService, ITopicService topicService, IFavouriteService favouriteService, 
     ICategoryService categoryService, IPostEditService postEditService)
 {
     _settingsService = settingsService;
     _emailService = emailService;
     _localizationService = localizationService;
     _activityService = activityService;
     _privateMessageService = privateMessageService;
     _membershipUserPointsService = membershipUserPointsService;
     _topicNotificationService = topicNotificationService;
     _voteService = voteService;
     _badgeService = badgeService;
     _categoryNotificationService = categoryNotificationService;
     _loggingService = loggingService;
     _uploadedFileService = uploadedFileService;
     _postService = postService;
     _pollVoteService = pollVoteService;
     _pollAnswerService = pollAnswerService;
     _pollService = pollService;
     _topicService = topicService;
     _favouriteService = favouriteService;
     _categoryService = categoryService;
     _postEditService = postEditService;
     _context = context as MVCForumContext;
 }
开发者ID:flerka,项目名称:mvcforum,代码行数:54,代码来源:MembershipService.cs


示例4: GetPostService

		private void GetPostService(UnitOfWork uow, out ICategoryService categoryService, out IForumService forumService, out ITopicService topicService, out IPostService postService) {
			ICategoryRepository cateRepo = new CategoryRepository(uow);
			IForumRepository forumRepo = new ForumRepository(uow);
			ITopicRepository topicRepo = new TopicRepository(uow);
			IPostRepository postRepo = new PostRepository(uow);
			IForumConfigurationRepository configRepo = new ForumConfigurationRepository(uow);

			IState request = new DummyRequest();

			ILogger logger = new ConsoleLogger();

			IUserRepository userRepo = new UserRepository(uow);
			User user = userRepo.Create(new User {
				Name = "D. Ummy",
				ProviderId = "12345678",
				FullName = "Mr. Doh Ummy",
				EmailAddress = "[email protected]",
				Culture = "th-TH",
				TimeZone = "GMT Standard Time"
			});

			List<IEventSubscriber> subscribers = new List<IEventSubscriber>();

			IEventPublisher eventPublisher = new EventPublisher(subscribers, logger, request);
			IUserProvider userProvider = new DummyUserProvider(user);
			IPermissionService permService = new PermissionService();
			IForumConfigurationService confService = new ForumConfigurationService(configRepo);

			categoryService = new CategoryService(userProvider, cateRepo, eventPublisher, logger, permService);
			forumService = new ForumService(userProvider, cateRepo, forumRepo, topicRepo, postRepo, eventPublisher, logger, permService);
			topicService = new TopicService(userProvider, forumRepo, topicRepo, postRepo, eventPublisher, logger, permService, confService);
			postService = new PostService(userProvider, forumRepo, topicRepo, postRepo, eventPublisher, logger, permService, confService);
		}
开发者ID:razzles67,项目名称:NForum,代码行数:33,代码来源:TestCustomPropertiesHolders.cs


示例5: ShowDeliciousDates

 static void ShowDeliciousDates(IPostService postService, string tag)
 {
     foreach (var date in postService.GetDeliciousDates(tag))
     {
         System.Console.WriteLine(date.Date + " " + date.Count);
     }
 }
开发者ID:czogori,项目名称:Delicious,代码行数:7,代码来源:Program.cs


示例6: ReportPostAdminController

 public ReportPostAdminController(
     IOrchardServices orchardServices,
     IForumService forumService,
     IThreadService threadService,
     IPostService postService,
     ISiteService siteService,
     IShapeFactory shapeFactory,
     IAuthorizationService authorizationService,
     IAuthenticationService authenticationService,
     ISubscriptionService subscriptionService,
     IReportPostService reportPostService,
     ICountersService countersService
     )
 {
     _orchardServices = orchardServices;
     _forumService = forumService;
     _threadService = threadService;
     _postService = postService;
     _siteService = siteService;
     _subscriptionService = subscriptionService;
     _authorizationService = authorizationService;
     _authenticationService = authenticationService;
     _reportPostService = reportPostService;
     _countersService = countersService;
     T = NullLocalizer.Instance;
     Shape = shapeFactory;
 }
开发者ID:jon123,项目名称:NGM.Forum,代码行数:27,代码来源:ReportPostAdminController.cs


示例7: PostAdminController

 public PostAdminController(ICategoryService categoryService, IPostService p, ITagService ts, IUserService us)
 {
     this.categoryService = categoryService;
     this.postService = p;
     this.tagService = ts;
     this.userService = us;
 }
开发者ID:Dharshz,项目名称:Tales-Blog,代码行数:7,代码来源:PostAdminController.cs


示例8: PostController

 public PostController(ILog logger, IConfigurationService configurationService, IPostService postService, ICategoryService categoryService, IUrlBuilder urlBuilder)
     : base(logger, configurationService)
 {
     this.postService = postService;
     this.categoryService = categoryService;
     this.urlBuilder = urlBuilder;
 }
开发者ID:prabhakara,项目名称:Dexter-Blog-Engine,代码行数:7,代码来源:PostController.cs


示例9: PostPartHandler

        public PostPartHandler(IRepository<PostPartRecord> repository, 
            IPostService postService, 
            IThreadService threadService, 
            IForumService forumService)
        {
            _postService = postService;
            _threadService = threadService;
            _forumService = forumService;

            Filters.Add(StorageFilter.For(repository));

            OnGetDisplayShape<PostPart>(SetModelProperties);
            OnGetEditorShape<PostPart>(SetModelProperties);
            OnUpdateEditorShape<PostPart>(SetModelProperties);

            OnCreated<PostPart>((context, part) => UpdatePostCount(part));
            OnPublished<PostPart>((context, part) => UpdatePostCount(part));
            OnUnpublished<PostPart>((context, part) => UpdatePostCount(part));
            OnVersioned<PostPart>((context, part, newVersionPart) => UpdatePostCount(newVersionPart));
            OnRemoved<PostPart>((context, part) => UpdatePostCount(part));

            OnRemoved<ThreadPart>((context, b) =>
                _postService
                    .Get(context.ContentItem.As<ThreadPart>())
                    .ToList()
                    .ForEach(post => context.ContentManager.Remove(post.ContentItem)));
        }
开发者ID:Trifectgaming,项目名称:Trifect-CMS,代码行数:27,代码来源:PostPartHandler.cs


示例10: PostController

 public PostController(IPostService postService, IDashboardService dashboardService, IBlogService blogService, ILogger logger)
     : base(logger)
 {
     _postService = postService;
     _dashboardService = dashboardService;
     _blogService = blogService;
 }
开发者ID:kevinrjones,项目名称:mblog,代码行数:7,代码来源:PostController.cs


示例11: PostsController

 public PostsController(IPostService postService, ITagService tagService, ICategoryService catService, IUserService userService)
 {
     this.postService = postService;
     this.tagService = tagService;
     this.catService = catService;
     this.userService = userService;
 }
开发者ID:beqa7137,项目名称:LayeredLibandaKi,代码行数:7,代码来源:PostsController.cs


示例12: SubscriptionController

        public SubscriptionController(
            IOrchardServices orchardServices,
            IForumService forumService,
            IThreadService threadService,
            IPostService postService,
            ISiteService siteService,
            IShapeFactory shapeFactory,
            IAuthorizationService authorizationService,
            IAuthenticationService authenticationService,
            ISubscriptionService subscriptionService,
            IThreadLastReadService threadLastReadService
            )
        {
            _orchardServices = orchardServices;
            _forumService = forumService;
            _threadService = threadService;
            _postService = postService;
            _siteService = siteService;
            _subscriptionService = subscriptionService;
            _authorizationService = authorizationService;
            _authenticationService = authenticationService;
            _threadLastReadService = threadLastReadService;

            T = NullLocalizer.Instance;
            Shape = shapeFactory;
        }
开发者ID:jon123,项目名称:NGM.Forum,代码行数:26,代码来源:SubscriptionController.cs


示例13: PostAdminController

 public PostAdminController(IPostService postService, IUserService userService, IAuthenticationService authenticationService, ICategoryService categoryService)
 {
     _postService = postService;
     _userService = userService;
     _authenticationService = authenticationService;
     _categoryService = categoryService;
 }
开发者ID:jango2015,项目名称:RabbitCMS,代码行数:7,代码来源:PostAdminController.cs


示例14: UserController

        /// <summary>
        /// Initializes a new instance of the <see cref="UserController"/> class.
        /// </summary>
        /// <param name="loggerService">Logger Service</param>
        /// <param name="userService">User Service</param>
        /// <param name="tripService">Trip Service</param>
        /// <param name="postService">Post Service</param>
        public UserController(
            ILoggerService loggerService,
            IUserService userService,
            ITripService tripService,
            IPostService postService)
            : base(loggerService)
        {
            if(userService == null)
            {
                throw new ArgumentNullException("User Service, User Controller");
            }

            if (tripService == null)
            {
                throw new ArgumentNullException("Trip Service, User Controller");
            }

            if (postService == null)
            {
                throw new ArgumentNullException("Post Service, User Controller");
            }

            this.userService = userService;
            this.tripService = tripService;
            this.postService = postService;
        }
开发者ID:kiran94,项目名称:travelme,代码行数:33,代码来源:UserController.cs


示例15: PostController

        public PostController(IPostService service)
        {
            if (service == null)
                throw new ArgumentNullException("service cannot be null");

            PostService = service;
        }
开发者ID:Nodios,项目名称:Games-Store,代码行数:7,代码来源:PostController.cs


示例16: ThreadPartHandler

        public ThreadPartHandler(IRepository<ThreadPartRecord> repository, 
            IPostService postService,
            IThreadService threadService,
            IForumService forumService,
            IContentManager contentManager)
        {
            _postService = postService;
            _threadService = threadService;
            _forumService = forumService;
            _contentManager = contentManager;

            Filters.Add(StorageFilter.For(repository));

            OnGetDisplayShape<ThreadPart>(SetModelProperties);
            OnGetEditorShape<ThreadPart>(SetModelProperties);
            OnUpdateEditorShape<ThreadPart>(SetModelProperties);

            OnActivated<ThreadPart>(PropertySetHandlers);
            OnLoading<ThreadPart>((context, part) => LazyLoadHandlers(part));
            OnCreated<ThreadPart>((context, part) => UpdateForumPartCounters(part));
            OnPublished<ThreadPart>((context, part) => UpdateForumPartCounters(part));
            OnUnpublished<ThreadPart>((context, part) => UpdateForumPartCounters(part));
            OnVersioning<ThreadPart>((context, part, newVersionPart) => LazyLoadHandlers(newVersionPart));
            OnVersioned<ThreadPart>((context, part, newVersionPart) => UpdateForumPartCounters(newVersionPart));
            OnRemoved<ThreadPart>((context, part) => UpdateForumPartCounters(part));

            OnRemoved<ForumPart>((context, b) =>
                _threadService
                    .Get(context.ContentItem.As<ForumPart>())
                    .ToList()
                    .ForEach(thread => context.ContentManager.Remove(thread.ContentItem)));
        }
开发者ID:Trifectgaming,项目名称:Trifect-CMS,代码行数:32,代码来源:ThreadPartHandler.cs


示例17: ShoutboxHub

        public ShoutboxHub(Work<IOrchardServices> orchardServices, IHelpers helpers, IShoutboxService shoutboxService, IPostService postService)
        {
            if (orchardServices == null)
            {
                throw new ArgumentNullException("orchardServices");
            }

            if (helpers == null)
            {
                throw new ArgumentNullException("helpers");
            }

            if (postService == null)
            {
                throw new ArgumentNullException("postService");
            }

            if (shoutboxService == null)
            {
                throw new ArgumentNullException("shoutboxService");
            }

            _OrchardServices = orchardServices;
            _Helpers = helpers;
            _ShoutboxService = shoutboxService;
            _PostService = postService;
        }
开发者ID:micrak,项目名称:anurgath-shoutbox,代码行数:27,代码来源:ShoutboxHub.cs


示例18: WidgetController

 public WidgetController(ILog logger, IConfigurationService configurationService, IPostService postService, ICategoryService categoryService, IPageService pageService)
     : base(logger, configurationService)
 {
     this.postService = postService;
     this.categoryService = categoryService;
     this.pageService = pageService;
 }
开发者ID:prabhakara,项目名称:Dexter-Blog-Engine,代码行数:7,代码来源:WidgetController.cs


示例19: PostPartHandler

        public PostPartHandler(IRepository<PostPartRecord> repository, 
            IPostService postService, 
            IClock clock,
            IReportPostService reportPostService,
            ICountersService countersService,
            ISubscriptionService subscriptionService

            ) {
            _postService = postService;
            _clock = clock;
            _reportPostService = reportPostService;
            _countersService = countersService;
            _subscriptionService = subscriptionService;

            Filters.Add(StorageFilter.For(repository));

            OnGetDisplayShape<PostPart>(SetModelProperties);
            OnGetEditorShape<PostPart>(SetModelProperties);
            OnUpdateEditorShape<PostPart>(SetModelProperties);

            OnCreated<PostPart>((context, part) => _countersService.UpdateCounters(part));

            OnPublished<PostPart>((context, part) => {
                _countersService.UpdateCounters(part);
                UpdateThreadVersioningDates(part);
                SendNewPostNotification(part);

                //for purposes of 'last read' need to know the last valid post to the thread.  The last time the user read the thread is tracked
                //and is compared to the lastest posts in the thread to determine if the thread has unread posts.
                if (!part.IsInappropriate)
                {
                    part.ThreadPart.LastestValidPostDate = part.As<CommonPart>().PublishedUtc.Value;
                }
            });
            OnUnpublished<PostPart>((context, part) => _countersService.UpdateCounters(part));
            OnVersioned<PostPart>((context, part, newVersionPart) => _countersService.UpdateCounters(newVersionPart));
            OnRemoved<PostPart>((context, part) =>
            {
                _countersService.UpdateCounters(part); 

                                                    //going to leave the history record for historic purposes
                                                    // RemoveReports(part); 
                                                    });

            OnRemoved<ThreadPart>((context, b) =>
                _postService.Delete(context.ContentItem.As<ThreadPart>()));

            
            OnIndexing<PostPart>((context, postPart) => context.DocumentIndex        
                                                    .Add("body", postPart.Record.Text).RemoveTags().Analyze()
                                                    .Add("format", postPart.Record.Format).Store()
                                                    .Add("forumsHomeId", postPart.ThreadPart.ForumPart.ForumCategoryPart.ForumsHomePagePart.Id)
                                                    .Add("categoryId", postPart.ThreadPart.ForumPart.ForumCategoryPart.Id)
                                                    .Add("forumId", postPart.ThreadPart.ForumPart.Id)
                                                    .Add("threadId", postPart.ThreadPart.Id)
                                                    );

            OnIndexing<ThreadPart>((context, threadPart) => context.DocumentIndex.Add("Title", threadPart.As<TitlePart>().Title ));
          
        }
开发者ID:jon123,项目名称:NGM.Forum,代码行数:60,代码来源:PostPartHandler.cs


示例20: AdminBadgeController

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="unitOfWorkManager"> </param>
 /// <param name="membershipService"> </param>
 /// <param name="localizationService"></param>
 /// <param name="settingsService"> </param>
 /// <param name="badgeService"> </param>
 /// <param name="loggingService"> </param>
 public AdminBadgeController(IBadgeService badgeService, IPostService postService, ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, 
     IMembershipService membershipService, ILocalizationService localizationService, ISettingsService settingsService)
     : base(loggingService, unitOfWorkManager, membershipService, localizationService, settingsService)
 {
     _badgeService = badgeService;
     _postService = postService;
 }
开发者ID:molntamas,项目名称:mvcforum,代码行数:16,代码来源:AdminBadgeController.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IPreConditioner类代码示例发布时间:2022-05-24
下一篇:
C# IPostRepository类代码示例发布时间: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