C# Class Subtext.Framework.Components.FeedbackItem

Inheritance: IIdentifiable
Datei anzeigen Open project: ayende/Subtext Class Usage Examples

Private Properties

Property Type Description
EmailCommentToAdmin void

Public Methods

Method 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.

Protected Methods

Method 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

Method Description
EmailCommentToAdmin ( FeedbackItem comment, BlogInfo currentBlog ) : void

Method Details

Approve() public static method

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

CalculateChecksum() public static method

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.
return int

ConfirmSpam() public static method

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

Create() public static method

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

Delete() public static method

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

Destroy() public static method

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

Destroy() public static method

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

FeedbackItem() public method

Creates a new FeedbackItem instance.
public FeedbackItem ( FeedbackType type ) : System
type FeedbackType Ptype.
return System

Get() public static method

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

GetFeedbackCounts() public static method

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

GetPagedFeedback() public static method

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.
return IPagedCollection

GetPagedFeedback() public static method

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.
return IPagedCollection

GetRecentComments() public static method

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

IsStatusSet() protected method

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

SetStatus() protected method

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

Update() public static method

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