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
Afficher le fichier Open project: umbraco/OurUmbraco Class Usage Examples

Méthodes publiques

Méthode 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

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

Method Details

CommentService() public méthode

public CommentService ( Umbraco.Core.DatabaseContext dbContext, TopicService topicService ) : System
dbContext Umbraco.Core.DatabaseContext
topicService TopicService
Résultat System

Delete() public méthode

public Delete ( OurUmbraco.Forum.Models.Comment comment ) : void
comment OurUmbraco.Forum.Models.Comment
Résultat void

GetAllCommentsForMember() public méthode

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

GetById() public méthode

public GetById ( int id ) : OurUmbraco.Forum.Models.Comment
id int
Résultat OurUmbraco.Forum.Models.Comment

Save() public méthode

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

SendNotifications() public méthode

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