本文整理汇总了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;
}
示例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)));
}
示例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;
}
示例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)));
}
示例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;
}
示例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);
}
示例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());
}
示例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());
}
示例9: FavoritesController
protected internal FavoritesController(IFavoriteTopicService favoriteTopicService, IForumService forumService, ILastReadService lastReadService, ITopicService topicService)
{
_favoriteTopicService = favoriteTopicService;
_forumService = forumService;
_lastReadService = lastReadService;
_topicService = topicService;
}
示例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();
}
示例11: ForumsHomePageService
public ForumsHomePageService(
IContentManager contentManager,
IForumService forumService
)
{
_contentManager = contentManager;
_forumService = forumService;
}
示例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;
}
示例13: ForumController
public ForumController(ICategoryService categoryService,
IForumService forumService,
IUserProvider userProvider,
IPermissionService permissionService)
: base(userProvider, permissionService) {
this.categoryService = categoryService;
this.forumService = forumService;
}
示例14: AdminMenu
public AdminMenu(
IForumsHomePageService forumForumsHomePageService,
IForumCategoryService forumCategoryService,
IForumService forumService
) {
_forumForumsHomePageService = forumForumsHomePageService;
_forumCategoryService = forumCategoryService;
_forumService = forumService;
}
示例15: ForumController
public ForumController(IForumService forumService,
IDateTimeHelper dateTimeHelper, ILocalizationService localizationService,
IPermissionService permissionService)
{
this._forumService = forumService;
this._dateTimeHelper = dateTimeHelper;
this._localizationService = localizationService;
this._permissionService = permissionService;
}