C# Class OurUmbraco.Forum.Services.CommentService

Used for CRUD of comments - There aren't any query methods for comments here, comments are resolved with a Topic in a single query be displayed in the view
ファイルを表示 Open project: umbraco/OurUmbraco Class Usage Examples

Public Methods

Method Description
CommentService ( Umbraco.Core.DatabaseContext dbContext, TopicService topicService ) : System
Delete ( OurUmbraco.Forum.Models.Comment comment ) : void
GetAllCommentsForMember ( int memberId ) : IEnumerable

Returns all comments that a given member has created

GetById ( int id ) : OurUmbraco.Forum.Models.Comment
Save ( OurUmbraco.Forum.Models.Comment comment, bool updateTopicPostCount = true ) : OurUmbraco.Forum.Models.Comment
SendNotifications ( OurUmbraco.Forum.Models.Comment comment, string memberName, string commentUrl ) : void

Private Methods

Method Description
UpdateTopicPostsCount ( OurUmbraco.Forum.Models.Comment c, bool adding = true ) : void

Method Details

CommentService() public method

public CommentService ( Umbraco.Core.DatabaseContext dbContext, TopicService topicService ) : System
dbContext Umbraco.Core.DatabaseContext
topicService TopicService
return System

Delete() public method

public Delete ( OurUmbraco.Forum.Models.Comment comment ) : void
comment OurUmbraco.Forum.Models.Comment
return void

GetAllCommentsForMember() public method

Returns all comments that a given member has created
public GetAllCommentsForMember ( int memberId ) : IEnumerable
memberId int
return IEnumerable

GetById() public method

public GetById ( int id ) : OurUmbraco.Forum.Models.Comment
id int
return OurUmbraco.Forum.Models.Comment

Save() public method

public Save ( OurUmbraco.Forum.Models.Comment comment, bool updateTopicPostCount = true ) : OurUmbraco.Forum.Models.Comment
comment OurUmbraco.Forum.Models.Comment
updateTopicPostCount bool
return OurUmbraco.Forum.Models.Comment

SendNotifications() public method

public SendNotifications ( OurUmbraco.Forum.Models.Comment comment, string memberName, string commentUrl ) : void
comment OurUmbraco.Forum.Models.Comment
memberName string
commentUrl string
return void