C# 클래스 OurUmbraco.Forum.Services.TopicService

파일 보기 프로젝트 열기: umbraco/OurUmbraco 1 사용 예제들

공개 메소드들

메소드 설명
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