C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
UpdateTopicPostsCount ( OurUmbraco.Forum.Models.Comment c, bool adding = true ) : void

Описание методов

CommentService() публичный Метод

public CommentService ( Umbraco.Core.DatabaseContext dbContext, TopicService topicService ) : System
dbContext Umbraco.Core.DatabaseContext
topicService TopicService
Результат System

Delete() публичный Метод

public Delete ( OurUmbraco.Forum.Models.Comment comment ) : void
comment OurUmbraco.Forum.Models.Comment
Результат void

GetAllCommentsForMember() публичный Метод

Returns all comments that a given member has created
public GetAllCommentsForMember ( int memberId ) : IEnumerable
memberId int
Результат IEnumerable

GetById() публичный Метод

public GetById ( int id ) : OurUmbraco.Forum.Models.Comment
id int
Результат OurUmbraco.Forum.Models.Comment

Save() публичный Метод

public Save ( OurUmbraco.Forum.Models.Comment comment, bool updateTopicPostCount = true ) : OurUmbraco.Forum.Models.Comment
comment OurUmbraco.Forum.Models.Comment
updateTopicPostCount bool
Результат OurUmbraco.Forum.Models.Comment

SendNotifications() публичный Метод

public SendNotifications ( OurUmbraco.Forum.Models.Comment comment, string memberName, string commentUrl ) : void
comment OurUmbraco.Forum.Models.Comment
memberName string
commentUrl string
Результат void