C# Class Subtext.Framework.Components.FeedbackItem

Inheritance: IIdentifiable
Afficher le fichier Open project: ayende/Subtext Class Usage Examples

Private Properties

Свойство Type Description
EmailCommentToAdmin void

Méthodes publiques

Méthode Description
Approve ( FeedbackItem feedback ) : void

Approves the comment, and removes it from the SPAM folder or from the Trash folder.

CalculateChecksum ( string text ) : int

Calculates a simple checksum of the specified text. This is used for comment filtering purposes. Once deployed, this algorithm shouldn't change.

ConfirmSpam ( FeedbackItem feedback ) : void

Confirms the feedback as spam and moves it to the trash.

Create ( FeedbackItem feedback, CommentFilter filter ) : int

Creates a feedback item in the database.

Delete ( FeedbackItem feedback ) : void

Confirms the feedback as spam and moves it to the trash.

Destroy ( FeedbackItem feedback ) : void

Confirms the feedback as spam and moves it to the trash.

Destroy ( FeedbackStatusFlag feedbackStatus ) : void

Destroys all non-active emails that meet the status.

FeedbackItem ( FeedbackType type ) : System

Creates a new FeedbackItem instance.

Get ( int feedbackId ) : FeedbackItem

Gets the specified feedback by id.

GetFeedbackCounts ( ) : FeedbackCounts

Gets the feedback counts for the various top level statuses.

GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackStatusFlag excludeStatusMask, FeedbackType type ) : IPagedCollection

Returns a pageable collection of comments.

GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackType type ) : IPagedCollection

Returns a pageable collection of comments.

GetRecentComments ( int itemCount ) : IList

Returns the itemCount most recent active comments.

Update ( FeedbackItem feedbackItem ) : bool

Updates the specified entry in the data provider.

Méthodes protégées

Méthode Description
IsStatusSet ( FeedbackStatusFlag status ) : bool

Checks to see if the specified status bit is set.

SetStatus ( FeedbackStatusFlag status, bool setOn ) : void

Turns the specified status bit on or off depending on the setOn value.

Private Methods

Méthode Description
EmailCommentToAdmin ( FeedbackItem comment, BlogInfo currentBlog ) : void

Method Details

Approve() public static méthode

Approves the comment, and removes it from the SPAM folder or from the Trash folder.
public static Approve ( FeedbackItem feedback ) : void
feedback FeedbackItem
Résultat void

CalculateChecksum() public static méthode

Calculates a simple checksum of the specified text. This is used for comment filtering purposes. Once deployed, this algorithm shouldn't change.
public static CalculateChecksum ( string text ) : int
text string Text.
Résultat int

ConfirmSpam() public static méthode

Confirms the feedback as spam and moves it to the trash.
public static ConfirmSpam ( FeedbackItem feedback ) : void
feedback FeedbackItem The feedback.
Résultat void

Create() public static méthode

Creates a feedback item in the database.
public static Create ( FeedbackItem feedback, CommentFilter filter ) : int
feedback FeedbackItem The feedback.
filter CommentFilter Spam filter.
Résultat int

Delete() public static méthode

Confirms the feedback as spam and moves it to the trash.
public static Delete ( FeedbackItem feedback ) : void
feedback FeedbackItem The feedback.
Résultat void

Destroy() public static méthode

Confirms the feedback as spam and moves it to the trash.
public static Destroy ( FeedbackItem feedback ) : void
feedback FeedbackItem The feedback.
Résultat void

Destroy() public static méthode

Destroys all non-active emails that meet the status.
public static Destroy ( FeedbackStatusFlag feedbackStatus ) : void
feedbackStatus FeedbackStatusFlag The feedback.
Résultat void

FeedbackItem() public méthode

Creates a new FeedbackItem instance.
public FeedbackItem ( FeedbackType type ) : System
type FeedbackType Ptype.
Résultat System

Get() public static méthode

Gets the specified feedback by id.
public static Get ( int feedbackId ) : FeedbackItem
feedbackId int The feedback id.
Résultat FeedbackItem

GetFeedbackCounts() public static méthode

Gets the feedback counts for the various top level statuses.
public static GetFeedbackCounts ( ) : FeedbackCounts
Résultat FeedbackCounts

GetPagedFeedback() public static méthode

Returns a pageable collection of comments.
public static GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackStatusFlag excludeStatusMask, FeedbackType type ) : IPagedCollection
pageIndex int
pageSize int
status FeedbackStatusFlag A flag for the status types to return.
excludeStatusMask FeedbackStatusFlag A flag for the statuses to exclude.
type FeedbackType The type of feedback to return.
Résultat IPagedCollection

GetPagedFeedback() public static méthode

Returns a pageable collection of comments.
public static GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackType type ) : IPagedCollection
pageIndex int
pageSize int
status FeedbackStatusFlag A flag for the status types to return.
type FeedbackType The type of feedback to return.
Résultat IPagedCollection

GetRecentComments() public static méthode

Returns the itemCount most recent active comments.
public static GetRecentComments ( int itemCount ) : IList
itemCount int
Résultat IList

IsStatusSet() protected méthode

Checks to see if the specified status bit is set.
protected IsStatusSet ( FeedbackStatusFlag status ) : bool
status FeedbackStatusFlag The status.
Résultat bool

SetStatus() protected méthode

Turns the specified status bit on or off depending on the setOn value.
protected SetStatus ( FeedbackStatusFlag status, bool setOn ) : void
status FeedbackStatusFlag
setOn bool
Résultat void

Update() public static méthode

Updates the specified entry in the data provider.
public static Update ( FeedbackItem feedbackItem ) : bool
feedbackItem FeedbackItem Entry.
Résultat bool