C# Class Rsdn.Janus.ForumHelper

Вспомогательные методы для работы с форумом.
Afficher le fichier Open project: rsdn/janus Class Usage Examples

Méthodes publiques

Méthode Description
CanSetForumReadMark ( this forum, bool isRead ) : bool
FindNextUnreadMsg ( this forum, bool skipActiveUnread ) : IMsg

Ищем первое непрочитанное сообщение от текущего. Если ниже текущего нет непрочитанных, пытаемся искать от корня.

Flatten ( this root ) : IEnumerable
GetDisplayName ( string name, string descript ) : string
GetFormatter ( [ provider ) : IJanusFormatter
MarkMessagesByDate ( [ provider, IEnumerable forumIds, bool isRead, System.DateTime startDate, System.DateTime endDate, bool exceptAnswersMe ) : int
MarkMessagesById ( [ provider, IEnumerable unreadMsgIds, int maxId ) : void
MarkMsgRead ( [ provider, IEnumerable messages, bool isRead, bool withSubnodes ) : void
SetForumsReadMark ( [ provider, IEnumerable forums, bool isRead ) : void
SetMessageRepliesAutoReadMark ( [ provider, IEnumerable messages, bool isEnabled ) : void

Private Methods

Méthode Description
FindNextUnreadMsg ( this forum ) : IMsg

Ищем первое непрочитанное сообщение от текущего. Если ниже текущего нет непрочитанных, пытаемся искать от корня.

Flatten ( this root, IMsg startBeyond ) : IEnumerable
GetMarkedMsgList ( IEnumerable msgs, bool markForRead ) : IEnumerable
GetReadRepliesMessages ( IEnumerable messages, bool readReplies, bool withSubnodes ) : IEnumerable
MarkMessagesRead ( IServiceProvider provider, int maxId, IEnumerable unreadIds ) : void

Помечает сообщения до maxId прочитанными, затем снимает флаг прочтения с укзанных сообщений.

MarkOlderThan ( IServiceProvider provider, System.DateTime beforeDate, System.DateTime afterDate, bool exceptAnswersMe, IEnumerable forumsIds, bool asRead ) : int
SetMsgGroupReadReplies ( IServiceProvider provider, IEnumerable mids, bool readReplies ) : void

Method Details

CanSetForumReadMark() public static méthode

public static CanSetForumReadMark ( this forum, bool isRead ) : bool
forum this
isRead bool
Résultat bool

FindNextUnreadMsg() public static méthode

Ищем первое непрочитанное сообщение от текущего. Если ниже текущего нет непрочитанных, пытаемся искать от корня.
public static FindNextUnreadMsg ( this forum, bool skipActiveUnread ) : IMsg
forum this .
skipActiveUnread bool Флаг, указывающий стоит ли /// пропускать текущее сообщение в заданном форуме, если оно не прочитано.
Résultat IMsg

Flatten() public static méthode

public static Flatten ( this root ) : IEnumerable
root this
Résultat IEnumerable

GetDisplayName() public static méthode

public static GetDisplayName ( string name, string descript ) : string
name string
descript string
Résultat string

GetFormatter() public static méthode

public static GetFormatter ( [ provider ) : IJanusFormatter
provider [
Résultat IJanusFormatter

MarkMessagesByDate() public static méthode

public static MarkMessagesByDate ( [ provider, IEnumerable forumIds, bool isRead, System.DateTime startDate, System.DateTime endDate, bool exceptAnswersMe ) : int
provider [
forumIds IEnumerable
isRead bool
startDate System.DateTime
endDate System.DateTime
exceptAnswersMe bool
Résultat int

MarkMessagesById() public static méthode

public static MarkMessagesById ( [ provider, IEnumerable unreadMsgIds, int maxId ) : void
provider [
unreadMsgIds IEnumerable
maxId int
Résultat void

MarkMsgRead() public static méthode

public static MarkMsgRead ( [ provider, IEnumerable messages, bool isRead, bool withSubnodes ) : void
provider [
messages IEnumerable
isRead bool
withSubnodes bool
Résultat void

SetForumsReadMark() public static méthode

public static SetForumsReadMark ( [ provider, IEnumerable forums, bool isRead ) : void
provider [
forums IEnumerable
isRead bool
Résultat void

SetMessageRepliesAutoReadMark() public static méthode

public static SetMessageRepliesAutoReadMark ( [ provider, IEnumerable messages, bool isEnabled ) : void
provider [
messages IEnumerable
isEnabled bool
Résultat void