C# Класс OurUmbraco.Forum.Services.TopicService

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ChangeCategory ( OurUmbraco.Forum.Models.Topic topic, int newCategory ) : void
CurrentTopic ( System.Web.HttpContextBase context, ICacheProvider cache ) : OurUmbraco.Forum.Models.ReadOnlyTopic

Get the current forum topic based on the id in the context

So that we don't have to look this up multiple times in a single request, this will use the given ICacheProvider to cache it

Delete ( OurUmbraco.Forum.Models.Topic topic ) : void
GetAllTopicsCount ( int category = -1 ) : int

Returns a count of all topics

GetAuthorLatestTopics ( int memberId ) : IEnumerable

Returns a set of topics for a specific author

GetById ( int id ) : OurUmbraco.Forum.Models.Topic
GetLatestTopics ( long take = 50, long page = 1, bool ignoreSpam = true, int category = -1 ) : IEnumerable

Returns a paged set of topics with the author information - without the comments loaded

GetLatestTopicsFiltered ( long take = 50, long page = 1, bool ignoreSpam = true, int category = -1, bool unsolved = false, bool noreplies = false ) : IEnumerable
GetLatestTopicsForMember ( int memberId, bool ignoreSpam = true, int maxCount = 100 ) : IEnumerable

Returns an in-memory collection of topics that a given member has participated in

Lock ( OurUmbraco.Forum.Models.Topic topic ) : void
QueryAll ( bool ignoreSpam = true, int maxCount = 1000 ) : IEnumerable

Returns a READER of all topics to be iterated over

QueryById ( int id ) : OurUmbraco.Forum.Models.ReadOnlyTopic

Returns a single topic including it's comments and author information

Save ( OurUmbraco.Forum.Models.Topic topic ) : OurUmbraco.Forum.Models.Topic
SendNotifications ( OurUmbraco.Forum.Models.ReadOnlyTopic topic, string memberName, string url ) : void
TopicService ( Umbraco.Core.DatabaseContext dbContext ) : System

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

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

public ChangeCategory ( OurUmbraco.Forum.Models.Topic topic, int newCategory ) : void
topic OurUmbraco.Forum.Models.Topic
newCategory int
Результат void

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

Get the current forum topic based on the id in the context
So that we don't have to look this up multiple times in a single request, this will use the given ICacheProvider to cache it
public CurrentTopic ( System.Web.HttpContextBase context, ICacheProvider cache ) : OurUmbraco.Forum.Models.ReadOnlyTopic
context System.Web.HttpContextBase
cache ICacheProvider
Результат OurUmbraco.Forum.Models.ReadOnlyTopic

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

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

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

Returns a count of all topics
public GetAllTopicsCount ( int category = -1 ) : int
category int
Результат int

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

Returns a set of topics for a specific author
public GetAuthorLatestTopics ( int memberId ) : IEnumerable
memberId int
Результат IEnumerable

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

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

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

Returns a paged set of topics with the author information - without the comments loaded
public GetLatestTopics ( long take = 50, long page = 1, bool ignoreSpam = true, int category = -1 ) : IEnumerable
take long
page long
ignoreSpam bool
category int
Результат IEnumerable

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

public GetLatestTopicsFiltered ( long take = 50, long page = 1, bool ignoreSpam = true, int category = -1, bool unsolved = false, bool noreplies = false ) : IEnumerable
take long
page long
ignoreSpam bool
category int
unsolved bool
noreplies bool
Результат IEnumerable

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

Returns an in-memory collection of topics that a given member has participated in
public GetLatestTopicsForMember ( int memberId, bool ignoreSpam = true, int maxCount = 100 ) : IEnumerable
memberId int
ignoreSpam bool
maxCount int
Результат IEnumerable

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

public Lock ( OurUmbraco.Forum.Models.Topic topic ) : void
topic OurUmbraco.Forum.Models.Topic
Результат void

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

Returns a READER of all topics to be iterated over
public QueryAll ( bool ignoreSpam = true, int maxCount = 1000 ) : IEnumerable
ignoreSpam bool
maxCount int /// Default is 1000 ///
Результат IEnumerable

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

Returns a single topic including it's comments and author information
public QueryById ( int id ) : OurUmbraco.Forum.Models.ReadOnlyTopic
id int
Результат OurUmbraco.Forum.Models.ReadOnlyTopic

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

public Save ( OurUmbraco.Forum.Models.Topic topic ) : OurUmbraco.Forum.Models.Topic
topic OurUmbraco.Forum.Models.Topic
Результат OurUmbraco.Forum.Models.Topic

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

public SendNotifications ( OurUmbraco.Forum.Models.ReadOnlyTopic topic, string memberName, string url ) : void
topic OurUmbraco.Forum.Models.ReadOnlyTopic
memberName string
url string
Результат void

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

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