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


C# IForumService类代码示例

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


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

示例1: ModeratorController

		protected internal ModeratorController(ITopicService topicService, IForumService forumService, IPostService postService, IModerationLogService moderationLogService)
		{
			_topicService = topicService;
			_forumService = forumService;
			_postService = postService;
			_moderationLogService = moderationLogService;
		}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:7,代码来源:ModeratorController.cs

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: PostPartHandler

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

            T = NullLocalizer.Instance;

            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)));

            OnIndexing<PostPart>((context, postPart) => context.DocumentIndex
                                                    .Add("body", postPart.Record.Text).RemoveTags().Analyze()
                                                    .Add("format", postPart.Record.Format).Store());
        }
开发者ID:Trifectgaming,项目名称:Trifect-CMS,代码行数:33,代码来源:PostPartHandler.cs

示例8: PostPartHandler

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

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

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

            OnCreated<PostPart>((context, part) => UpdateCounters(part));
            OnPublished<PostPart>((context, part) => { 
                UpdateCounters(part);
                UpdateThreadVersioningDates(part);
            });
            OnUnpublished<PostPart>((context, part) => UpdateCounters(part));
            OnVersioned<PostPart>((context, part, newVersionPart) => UpdateCounters(newVersionPart));
            OnRemoved<PostPart>((context, part) => UpdateCounters(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());
        }
开发者ID:six006,项目名称:NGM.Forum,代码行数:32,代码来源:PostPartHandler.cs

示例9: FavoritesController

		protected internal FavoritesController(IFavoriteTopicService favoriteTopicService, IForumService forumService, ILastReadService lastReadService, ITopicService topicService)
		{
			_favoriteTopicService = favoriteTopicService;
			_forumService = forumService;
			_lastReadService = lastReadService;
			_topicService = topicService;
		}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:7,代码来源:FavoritesController.cs

示例10: Communicator

 public Communicator()
 {
     BasicHttpBinding bb = new BasicHttpBinding();
     bb.MaxReceivedMessageSize = 1048576; // 1 MB
     httpFactory = new ChannelFactory<IForumService>(new BasicHttpBinding(), new EndpointAddress(HOST + ":" + PORT));
     httpProxy = httpFactory.CreateChannel();
 }
开发者ID:nivsto,项目名称:ForumGenerator_Version2,代码行数:7,代码来源:Communicator.cs

示例11: ForumsHomePageService

 public ForumsHomePageService(
     IContentManager contentManager,
     IForumService forumService   
  )
 {
     _contentManager = contentManager;
     _forumService = forumService;
 }
开发者ID:jon123,项目名称:NGM.Forum,代码行数:8,代码来源:ForumRootService.cs

示例12: SubscriptionController

		protected internal SubscriptionController(ISubscribedTopicsService subService, ITopicService topicService, IUserService userService, ILastReadService lastReadService, IForumService forumService)
		{
			_subService = subService;
			_topicService = topicService;
			_userService = userService;
			_lastReadService = lastReadService;
			_forumService = forumService;
		}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:8,代码来源:SubscriptionController.cs

示例13: ForumController

		public ForumController(ICategoryService categoryService,
									IForumService forumService,
									IUserProvider userProvider,
									IPermissionService permissionService)
			: base(userProvider, permissionService) {

			this.categoryService = categoryService;
			this.forumService = forumService;
		}
开发者ID:razzles67,项目名称:NForum,代码行数:9,代码来源:ForumController.cs

示例14: AdminMenu

 public AdminMenu(
     IForumsHomePageService forumForumsHomePageService,
     IForumCategoryService forumCategoryService,
     IForumService forumService
 ) {
     _forumForumsHomePageService = forumForumsHomePageService;
     _forumCategoryService = forumCategoryService;
     _forumService = forumService;                        
 }
开发者ID:jon123,项目名称:NGM.Forum,代码行数:9,代码来源:AdminMenu.cs

示例15: ForumController

 public ForumController(IForumService forumService,
     IDateTimeHelper dateTimeHelper, ILocalizationService localizationService,
     IPermissionService permissionService)
 {
     this._forumService = forumService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
 }
开发者ID:GloriousOnion,项目名称:SmartStoreNET,代码行数:9,代码来源:ForumController.cs


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