本文整理汇总了C#中IPostService类的典型用法代码示例。如果您正苦于以下问题:C# IPostService类的具体用法?C# IPostService怎么用?C# IPostService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPostService类属于命名空间,在下文中一共展示了IPostService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AtomController
public AtomController(IUserService userService, IPostService postService, ILogger logger, ISyndicationFeedService syndicationFeedService)
: base(logger)
{
_userService = userService;
_postService = postService;
_syndicationFeedService = syndicationFeedService;
}
示例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)));
}
}
示例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;
}
示例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);
}
示例5: ShowDeliciousDates
static void ShowDeliciousDates(IPostService postService, string tag)
{
foreach (var date in postService.GetDeliciousDates(tag))
{
System.Console.WriteLine(date.Date + " " + date.Count);
}
}
示例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;
}
示例7: PostAdminController
public PostAdminController(ICategoryService categoryService, IPostService p, ITagService ts, IUserService us)
{
this.categoryService = categoryService;
this.postService = p;
this.tagService = ts;
this.userService = us;
}
示例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;
}
示例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)));
}
示例10: PostController
public PostController(IPostService postService, IDashboardService dashboardService, IBlogService blogService, ILogger logger)
: base(logger)
{
_postService = postService;
_dashboardService = dashboardService;
_blogService = blogService;
}
示例11: PostsController
public PostsController(IPostService postService, ITagService tagService, ICategoryService catService, IUserService userService)
{
this.postService = postService;
this.tagService = tagService;
this.catService = catService;
this.userService = userService;
}
示例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;
}
示例13: PostAdminController
public PostAdminController(IPostService postService, IUserService userService, IAuthenticationService authenticationService, ICategoryService categoryService)
{
_postService = postService;
_userService = userService;
_authenticationService = authenticationService;
_categoryService = categoryService;
}
示例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;
}
示例15: PostController
public PostController(IPostService service)
{
if (service == null)
throw new ArgumentNullException("service cannot be null");
PostService = service;
}