本文整理匯總了C#中Subtext.Framework.Components.FeedbackItem.SetStatus方法的典型用法代碼示例。如果您正苦於以下問題:C# FeedbackItem.SetStatus方法的具體用法?C# FeedbackItem.SetStatus怎麽用?C# FeedbackItem.SetStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Subtext.Framework.Components.FeedbackItem
的用法示例。
在下文中一共展示了FeedbackItem.SetStatus方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Delete
/// <summary>
/// Confirms the feedback as spam and moves it to the trash.
/// </summary>
/// <param name="feedback">The feedback.</param>
public static void Delete(this ObjectRepository repository, FeedbackItem feedback)
{
if (feedback == null)
{
throw new ArgumentNullException("feedback");
}
feedback.SetStatus(FeedbackStatusFlag.Approved, false);
feedback.SetStatus(FeedbackStatusFlag.Deleted, true);
repository.Update(feedback);
}
示例2: Approve
/// <summary>
/// Approves the comment, and removes it from the SPAM folder or from the
/// Trash folder.
/// </summary>
/// <param name="feedback"></param>
/// <param name="spamService"></param>
/// <returns></returns>
public static void Approve(this ObjectRepository repository, FeedbackItem feedback, ICommentSpamService spamService)
{
if (feedback == null)
{
throw new ArgumentNullException("feedback");
}
feedback.SetStatus(FeedbackStatusFlag.Approved, true);
feedback.SetStatus(FeedbackStatusFlag.Deleted, false);
if (spamService != null)
{
spamService.SubmitGoodFeedback(feedback);
}
repository.Update(feedback);
}
示例3: ConfirmSpam
/// <summary>
/// Confirms the feedback as spam and moves it to the trash.
/// </summary>
/// <param name="feedback">The feedback.</param>
public static void ConfirmSpam(FeedbackItem feedback)
{
if (feedback == null)
throw new ArgumentNullException("feedback", "Cannot approve a null comment.");
feedback.SetStatus(FeedbackStatusFlag.Approved, false);
feedback.SetStatus(FeedbackStatusFlag.ConfirmedSpam, true);
if (Config.CurrentBlog.FeedbackSpamService != null)
{
Config.CurrentBlog.FeedbackSpamService.SubmitGoodFeedback(feedback);
}
Update(feedback);
}
示例4: Delete
/// <summary>
/// Confirms the feedback as spam and moves it to the trash.
/// </summary>
/// <param name="feedback">The feedback.</param>
public static void Delete(FeedbackItem feedback)
{
if (feedback == null)
throw new ArgumentNullException("feedback", "Cannot delete a null comment.");
feedback.SetStatus(FeedbackStatusFlag.Approved, false);
feedback.SetStatus(FeedbackStatusFlag.Deleted, true);
Update(feedback);
}
示例5: ConfirmSpam
/// <summary>
/// Confirms the feedback as spam and moves it to the trash.
/// </summary>
/// <param name="feedback">The feedback.</param>
/// <param name="spamService"></param>
public static void ConfirmSpam(FeedbackItem feedback, ICommentSpamService spamService)
{
if(feedback == null)
{
throw new ArgumentNullException("feedback");
}
feedback.SetStatus(FeedbackStatusFlag.Approved, false);
feedback.SetStatus(FeedbackStatusFlag.ConfirmedSpam, true);
if(spamService != null)
{
spamService.SubmitGoodFeedback(feedback);
}
Update(feedback);
}