public BlogCommentService(IBlogCommentRepository commentDal, IBlogArticleRepository blogDal) { this._commentDal = commentDal; this.baseDal = commentDal; this._blogDal = blogDal; }
public BlogController(IBlogService blogService, IBlogCategoryService blogCategoryService, IBlogCommentRepository blogComment, IBlogTagRepository blogTagRepository, IConfiguration configuration) { _blogService = blogService; _blogCategoryService = blogCategoryService; _blogComment = blogComment; _blogTagRepository = blogTagRepository; _configuration = configuration; }
public HttpResponseMessage SubmitComment(HttpRequestMessage request, [FromBody] BlogComment blogComment) { HttpResponseMessage response = null; try { blogComment.Timestamp = DateTime.Now; PreSubmissionCommentEventArgs preArgs = new PreSubmissionCommentEventArgs(blogComment); _ExtensibilityManager.InvokeCancelableModuleEvent <PreSubmissionCommentEventArgs>( _ModuleEvents.PreSubmissionComment, preArgs); if (!preArgs.Cancel) { IBlogCommentRepository blogCommentRepository = _componentLocator.ResolveComponent <IBlogCommentRepository>(); blogComment.CommentBody = preArgs.CommentReplacement; blogComment = blogCommentRepository.Add(blogComment); PostSubmissionCommentEventArgs postArgs = new PostSubmissionCommentEventArgs(blogComment); _ExtensibilityManager.InvokeModuleEvent <PostSubmissionCommentEventArgs>( _ModuleEvents.PostSubmissionComment, postArgs); response = request.CreateResponse <BlogComment>(HttpStatusCode.OK, blogComment); } else { throw new ApplicationException("Comment submission has been blocked."); } } catch (Exception ex) { response = request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex); } return(response); }
/// <summary> /// Constructor /// </summary> public BlogCommentBlockController(IBlogCommentRepository commentRepository, IPageRepository pageRepository, IPageRouteHelper pageRouteHelper) { _commentRepository = commentRepository; _pageRepository = pageRepository; _pageRouteHelper = pageRouteHelper; }
public BlogCommentService(IBlogCommentRepository blogCommentRepository) { BlogCommentRepository = blogCommentRepository; }
public BlogCommentController(IBlogCommentRepository blogCommentRepository) { _blogCommentRepository = blogCommentRepository; }
public BlogCommandHandler(IBlogCommentRepository blogCommentRepository) { _blogCommentRepository = blogCommentRepository; }
public BlogCommentService(IBlogCommentRepository blogCommentRepository) : base(blogCommentRepository) { }
public BlogDomain(IBlogRepository blogRepository, IBlogCommentRepository blogCommentRepository, IImageRepository imageRepository) { _blogRepository = blogRepository; _blogCommentRepository = blogCommentRepository; _imageRepository = imageRepository; }
public BlogCommentService(IBlogCommentRepository blogCommentRepository, IUnitOfWork unitOfWork) { _blogCommentRepository = blogCommentRepository; _unitOfWork = unitOfWork; }