public HasCommentsHandler( IContentManager contentManager, IRepository<HasCommentsRecord> hasCommentsRepository, ICommentService commentService) { Filters.Add(StorageFilter.For(hasCommentsRepository)); OnActivated<HasComments>((ctx, x) => { x.CommentsActive = true; x.CommentsShown = true; }); OnLoading<HasComments>((context, comments) => { comments._comments.Loader(list => contentManager .Query<Comment, CommentRecord>() .Where(x => x.CommentedOn == context.ContentItem.Id && x.Status == CommentStatus.Approved) .List().ToList()); comments._pendingComments.Loader(list => contentManager .Query<Comment, CommentRecord>() .Where(x => x.CommentedOn == context.ContentItem.Id && x.Status == CommentStatus.Pending) .List().ToList()); }); OnRemoved<HasComments>( (context, c) => { foreach (var comment in commentService.GetCommentsForCommentedContent(context.ContentItem.Id)) { contentManager.Remove(comment.ContentItem); } }); }
public ChatApiController(IUserService service, IChatService service2, ICommentService service3, ILiveChat service4) { this._userService = service; this._chatService = service2; this._commentService = service3; this._LiveChat = service4; }
public EntryController(IEntryService entryService, ICommentService commentService, IBlogService blogService, ITagService tagService) { _entryService = entryService; _commentService = commentService; _blogService = blogService; _tagService = tagService; }
public PostController(IPostService service, ITagService ts, ICommentService commentService, IUserService us) { this.postService = service; this.tagService = ts; this.userService = us; this.commentService = commentService; }
public PostAppService(IPostService postService, ICommentService commentService, ICategoryService categoryService, IPostValidation postValidation) { this.postService = postService; this.commentService = commentService; this.categoryService = categoryService; this.postValidation = postValidation; }
protected void Page_Load(object sender, EventArgs e) { eventId = Convert.ToInt64(Request.Params.Get("eventId")); commentId = Convert.ToInt64(Request.Params.Get("commentId")); IUnityContainer container = (IUnityContainer)HttpContext.Current.Application["unityContainer"]; commentService = container.Resolve<ICommentService>(); if (!IsPostBack) { CommentInfo c = commentService.GetCommentById(commentId); List<Tag> tags = commentService.GetTagsByCommentId(commentId); string stags = ParseTags(tags); this.txtComment.Text = c.texto; this.txtTags.Text = stags; } if (!SessionManager.IsUserAuthenticated(Context)) { /* Do action. */ String url = Settings.Default.PracticaMaD_applicationURL + "Pages/User/Authentication.aspx" + "?eventId=" + eventId; Response.Redirect(Response.ApplyAppPathModifier(url)); } else { userId = SessionManager.GetUserSession(Context).UserProfileId; } }
public BlogImportRepository(ISubtextContext context, ICommentService commentService, IEntryPublisher entryPublisher, IBlogMLImportMapper mapper) { SubtextContext = context; CommentService = commentService; EntryPublisher = entryPublisher; Mapper = mapper; }
public PostAppService() { this.postValidation = ValidationFactory.GetPostValidation(); this.postService = ServiceFactory.GetPostService(RepositoryFactory.GetPostRepository(), this.postValidation); this.commentService = ServiceFactory.GetCommentService(RepositoryFactory.GetCommentRepository(), null); this.categoryService = ServiceFactory.GetCategoryService(RepositoryFactory.GetCategoryRepository(), null); }
public ArticleController(IBlogService blogService, IArticleService articleService, ITagService tagService, ICommentService commentService) { _blogService = blogService; _articleService = articleService; _tagService = tagService; _commentService = commentService; }
public CommentPartHandler( IRepository<CommentPartRecord> commentsRepository, IContentManager contentManager, ICommentService commentService ) { Filters.Add(StorageFilter.For(commentsRepository)); OnLoading<CommentPart>((context, comment) => { comment.CommentedOnContentItemField.Loader( item => contentManager.Get(comment.CommentedOn) ); comment.CommentedOnContentItemMetadataField.Loader( item => contentManager.GetItemMetadata(comment.CommentedOnContentItem) ); }); OnRemoving<CommentPart>((context, comment) => { foreach(var response in contentManager.Query<CommentPart, CommentPartRecord>().Where(x => x.RepliedOn == comment.Id).List()) { contentManager.Remove(response.ContentItem); } }); // keep CommentsPart.Count in sync OnPublished<CommentPart>((context, part) => commentService.ProcessCommentsCount(part.CommentedOn)); OnUnpublished<CommentPart>((context, part) => commentService.ProcessCommentsCount(part.CommentedOn)); OnVersioned<CommentPart>((context, part, newVersionPart) => commentService.ProcessCommentsCount(newVersionPart.CommentedOn)); OnRemoved<CommentPart>((context, part) => commentService.ProcessCommentsCount(part.CommentedOn)); OnIndexing<CommentPart>((context, commentPart) => context.DocumentIndex .Add("commentText", commentPart.Record.CommentText)); }
public CommentTokens( IContentManager contentManager, ICommentService commentService) { _contentManager = contentManager; _commentService = commentService; T = NullLocalizer.Instance; }
public CommentsPartHandler( IContentManager contentManager, IRepository<CommentsPartRecord> commentsRepository, ICommentService commentService) { Filters.Add(StorageFilter.For(commentsRepository)); OnInitializing<CommentsPart>((ctx, part) => { part.CommentsActive = true; part.CommentsShown = true; part.Comments = new List<CommentPart>(); }); OnLoading<CommentsPart>((context, comments) => { comments.CommentsField.Loader(list => contentManager .Query<CommentPart, CommentPartRecord>() .Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Approved) .OrderBy(x => x.Position) .List().ToList()); comments.PendingCommentsField.Loader(list => contentManager .Query<CommentPart, CommentPartRecord>() .Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Pending) .List().ToList()); }); OnRemoved<CommentsPart>( (context, c) => { var comments = commentService.GetCommentsForCommentedContent(context.ContentItem.Id).List(); foreach (var comment in comments) { contentManager.Remove(comment.ContentItem); } }); }
public CommentsController(IUsersService users, ICommentService comments, IHomeService homes, INeedService needs) : base(users) { this.comments = comments; this.homes = homes; this.needs = needs; }
public CommentController(IOrchardServices services, ICommentService commentService, INotifier notifier) { Services = services; _commentService = commentService; _notifier = notifier; T = NullLocalizer.Instance; }
/// <summary> /// Constructor /// </summary> /// <param name="log"></param> /// <param name="localizationService"></param> /// <param name="siteService"></param> /// <param name="userService"></param> /// <param name="contentItemService"></param> /// <param name="contentItemServiceForPage"></param> /// <param name="commentService"></param> /// <param name="categoryService"></param> /// <param name="tagService"></param> /// <param name="searchService"></param> /// <param name="widgetService"></param> /// <param name="messageService"></param> protected ContentControllerBase( ILog log, ILocalizationService localizationService, ISiteService siteService, IUserService userService, IContentItemService<Post> contentItemService, IContentItemService<Page> contentItemServiceForPage, ICommentService commentService, ICategoryService categoryService, ITagService tagService, ISearchService searchService, IWidgetService widgetService, IMessageService messageService) { this.log = log; this.localizationService = IoC.Resolve<ILocalizationService>(); this.userService = IoC.Resolve<IUserService>(); this.siteService = IoC.Resolve<ISiteService>(); this.categoryService = IoC.Resolve<ICategoryService>(); this.tagService = IoC.Resolve<ITagService>(); this.contentItemService = contentItemService; this.contentItemServiceForPage = contentItemServiceForPage; this.commentService = commentService; this.searchService = searchService; this.widgetService = widgetService; this.messageService = messageService; registeredWidgetComponents = new List<IWidgetComponent>(); currentCulture = Thread.CurrentThread.CurrentUICulture; }
static ProductDetails() { IUnityContainer container = (IUnityContainer)HttpContext.Current.Application["unityContainer"]; productService = container.Resolve<IProductService>(); commentService = container.Resolve<ICommentService>(); }
public CommentController(ICommentMapper commentMapper, IImageAlbumService imageAlbumService, ICommentService commentService, IMembershipService membershipService) { this._commentMapper = commentMapper; this._imageAlbumService = imageAlbumService; this._commentService = commentService; this._membershipService = membershipService; }
public AdminCommentController(ILog log, IContentItemService<Post> contentItemService, ICommentService commentService, ILocalizationService localizationService, IUserService userService, ISiteService siteService) : base(log, localizationService, userService, siteService) { this.log = log; this.commentService = commentService; this.contentItemService = contentItemService; }
public CommentsController(ICommentService comments, IAnimalService animals, IUserService users, ISanitizer sanitizeService) { this.comments = comments; this.animals = animals; this.users = users; this.sanitizeService = sanitizeService; }
public PostController(DbContext dbContext, IPostService postService, ICommentService commentService, IPagingHandler<Post> pagingHandler) : base(dbContext) { this._postService = postService; _commentService = commentService; _pagingHandler = pagingHandler; }
public PostsController(IPostService service, ITagService ts, ICommentService commentService, IUserService us, ICategoryService cs) { this.postService = service; this.tagService = ts; this.userService = us; this.commentService = commentService; this.categoryService = cs; }
public HomeController(IUserService userService, IRoleService roleService, ICommentService commentService, IBlogService blogService, IArticleService articleService) { this.userService = userService; this.roleService = roleService; this.commentService = commentService; this.blogService = blogService; this.articleService = articleService; }
public AdministratorController(IBlogService blogService, IEntryService entryService, IUserService userService, ITagService tagService, ICommentService commentService) { _blogService = blogService; _entryService = entryService; _userService = userService; _tagService = tagService; _commentService = commentService; }
public ArticleController(IUserService service, IBlogService blogService, IArticleService articleService, ICommentService commentService) { _userService = service; _blogService = blogService; _articleService = articleService; _commentService = commentService; }
public SidebarController(IUserService userService, IArticleService articleService, ICategoryService categoryService, ICommentService commentService, ISettingService settionService) { _articleService = articleService; _categoryService = categoryService; _settionService = settionService; _commentService = commentService; _userService = userService; }
public ArticleController(IUserService userService, IArticleService articleService, IRoleService roleService,ITagService tagService,ICommentService commentService) { this.userService = userService; this.articleService = articleService; this.roleService = roleService; this.tagService = tagService; this.commentService = commentService; }
public AdminController(ICategoryService categoryService, IUserService userService, IRoleService roleService, IQuestionService questionService, ICommentService commentService) { _roleService = roleService; _categoryService = categoryService; _userService = userService; _questionService = questionService; _commentService = commentService; }
public CommentTokens( IContentManager contentManager, IWorkContextAccessor workContextAccessor, ICommentService commentService) { _contentManager = contentManager; _workContextAccessor = workContextAccessor; _commentService = commentService; T = NullLocalizer.Instance; }
public static void MyClassInitialize(TestContext testContext) { container = TestManager.ConfigureUnityContainer("unity"); UserService = container.Resolve<IUserService>(); CommentService = container.Resolve<ICommentService>(); commentDao = container.Resolve<ICommentDao>(); tagDao = container.Resolve<ITagDao>(); userDao = container.Resolve<IUserDao>(); }
static SeeCommentByTag() { IUnityContainer container = (IUnityContainer)HttpContext.Current.Application["unityContainer"]; //productService = container.Resolve<IProductService>(); commentService = container.Resolve<ICommentService>(); }
public RecipesController(IRecipeService recipeService, ICommentService commentService) { this.recipeService = recipeService; this.commentService = commentService; }
public CommentServiceTests() { _commentService = new CommentService(ImmedisDbContext); }
public CommentController(ICommentService _commentService) { commentService = _commentService; }
public NotificationController(IGoalService goalService, IUpdateService updateService, ICommentService commentService, IGroupInvitationService groupInvitationService, ISupportInvitationService supportInvitationService, IFollowRequestService followRequestService, IUserService userService) { this.goalService = goalService; this.supportInvitationService = supportInvitationService; this.updateService = updateService; this.groupInvitationService = groupInvitationService; this.commentService = commentService; this.followRequestService = followRequestService; this.userService = userService; }
public CommentController(ICommentService commentService) { this.commentService = commentService; }
public CommentsContainerPartDriver(ICommentService commentService) { _commentService = commentService; }
public MovieController(IMovieService _movieService, ICountryMovieService _countryMovieService, IMapper _mapper, IUserLoginService _userLoginService, ICommentService _commentService) { moviesService = _movieService; countryMovieService = _countryMovieService; mapper = _mapper; userLoginService = _userLoginService; commentService = _commentService; }
public CommentController(ICommentService commentService) { _comService = commentService; }
public CommentViewComponent(ICommentService commentService, UserManager <User> userManager) { _commentService = commentService; _userManager = userManager; }
public CommentModel(ICommentService commentService) : base(commentService) { }
public CommentController(ICommentService commentService, IMapper mapper, IHubContext <CommentHub> hubContext) { _commentService = commentService; _mapper = mapper; _hubContext = hubContext; }
public ArticleController(IArticleService articleService, ICategoryService categoryService, ICommentService commentService, ITagService tagService) { this.articleService = articleService; this.categoryService = categoryService; this.commentService = commentService; this.tagService = tagService; }
public GoalController(IGoalService goalService, IMetricService metricService, IFocusService focusService, ISupportService supportService, IUpdateService updateService, ICommentService commentService, IUserService userService, ISecurityTokenService securityTokenService, ISupportInvitationService supportInvitationService, IGoalStatusService goalStatusService, ICommentUserService commentUserService, IUpdateSupportService updateSupportService) { this.goalService = goalService; this.supportInvitationService = supportInvitationService; this.metricService = metricService; this.focusService = focusService; this.supportService = supportService; this.updateService = updateService; this.commentService = commentService; this.userService = userService; this.securityTokenService = securityTokenService; this.goalStatusService = goalStatusService; this.commentUserService = commentUserService; this.updateSupportService = updateSupportService; }
public ProductCommentController(IOrderService iOrderService, ICommentService iCommentService, ITypeService iTypeService) { _iOrderService = iOrderService; _iCommentService = iCommentService; _iTypeService = iTypeService; }
public BlogsController(IBlogService blogService, IMapper mapper, ICommentService commentService) { _commentService = commentService; _blogService = blogService; _mapper = mapper; }
public CommentTreeBuilder(ICommentService commentService) { _commentService = commentService; }