本文整理汇总了C#中IForumService类的典型用法代码示例。如果您正苦于以下问题:C# IForumService类的具体用法?C# IForumService怎么用?C# IForumService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IForumService类属于命名空间,在下文中一共展示了IForumService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: GetFirstPost
/// <summary>
/// Get first post
/// </summary>
/// <param name="forumTopic">Forum topic</param>
/// <param name="forumService">Forum service</param>
/// <returns>Forum post</returns>
public static ForumPost GetFirstPost(this ForumTopic forumTopic, IForumService forumService)
{
if (forumTopic == null)
throw new ArgumentNullException("forumTopic");
var forumPosts = forumService.GetAllPosts(forumTopic.Id, 0, string.Empty, 0, 1);
if (forumPosts.Count > 0)
return forumPosts[0];
return null;
}
开发者ID:vic0626,项目名称:nas-merk,代码行数:17,代码来源:ForumExtensions.cs
示例17: PrivateMessagesController
public PrivateMessagesController(IForumService forumService,
ICustomerService customerService,
IWorkContext workContext,
ForumSettings forumSettings, CustomerSettings customerSettings)
{
this._forumService = forumService;
this._customerService = customerService;
this._workContext = workContext;
this._forumSettings = forumSettings;
this._customerSettings = customerSettings;
}
开发者ID:CCSW,项目名称:desnivell,代码行数:11,代码来源:PrivateMessagesController.cs
示例18: CountersService
public CountersService(
IForumService forumService,
IThreadService threadService,
IPostService postService,
IContentManager contentManager
)
{
_forumService = forumService;
_threadService = threadService;
_postService = postService;
_contentManager = contentManager;
}
开发者ID:jon123,项目名称:NGM.Forum,代码行数:12,代码来源:CountersService.cs
示例19: Communicator
public Communicator()
{
BasicHttpBinding bb = new BasicHttpBinding();
bb.MaxReceivedMessageSize = 1048576; // 1 MB
// httpFactory = new ChannelFactory<IForumService>(new BasicHttpBinding(), new EndpointAddress("http://192.168.1.117:8888/methods"));
httpFactory = new ChannelFactory<IForumService>(bb, new EndpointAddress("http://localhost:8888/methods"));
httpProxy = httpFactory.CreateChannel();
// httpFactory = new ChannelFactory<IForumService>(new BasicHttpBinding(), new EndpointAddress("http://192.168.1.117:8888/methods"));
httpFactory = new ChannelFactory<IForumService>(bb, new EndpointAddress("http://localhost:8888/methods"));
httpProxy = httpFactory.CreateChannel();
}
开发者ID:nivsto,项目名称:ForumGenerator_Version2,代码行数:12,代码来源:Communicator.cs
示例20: PostService
public PostService(IPostRepository postRepository, IProfileRepository profileRepository, ISettingsManager settingsManager, ITopicService topicService, ITextParsingService textParsingService, IModerationLogService moderationLogService, IForumService forumService, IEventPublisher eventPublisher, IUserService userService, IFeedService feedService)
{
_postRepository = postRepository;
_profileRepository = profileRepository;
_settingsManager = settingsManager;
_topicService = topicService;
_textParsingService = textParsingService;
_moderationLogService = moderationLogService;
_forumService = forumService;
_eventPublisher = eventPublisher;
_userService = userService;
_feedService = feedService;
}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:13,代码来源:PostService.cs
注:本文中的IForumService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论