Subtext.Framework.Components.FeedbackItem.Destroy C# (CSharp) Méthode

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
        public static void Destroy(FeedbackItem feedback)
        {
            if (feedback == null)
                throw new ArgumentNullException("feedback", "Cannot destroy a null comment.");

            if (feedback.Approved)
                throw new InvalidOperationException("Cannot destroy an approved comment. Please flag it as spam or trash it first.");

            ObjectProvider.Instance().DestroyFeedback(feedback.Id);
        }

Same methods

FeedbackItem::Destroy ( FeedbackStatusFlag feedbackStatus ) : void