public bool UnmarkAsSpam(DateTime at, IUser byUser) { Check.Argument.IsNotInvalidDate(at, "at"); Check.Argument.IsNotNull(byUser, "byUser"); if (CanUnmarkAsSpam(byUser)) { var spam = this.GetMarkAsSpam(byUser); this.UnmarkSpam(spam); StoryMarkAsSpams.Remove((StoryMarkAsSpam)spam); LastActivityAt = at; return(true); } return(false); }
public virtual bool UnmarkAsSpam(DateTime at, IUser byUser) { Check.Argument.IsNotInvalidDate(at, "at"); Check.Argument.IsNotNull(byUser, "byUser"); if (CanUnmarkAsSpam(byUser)) { IMarkAsSpamRepository repository = IoC.Resolve <IMarkAsSpamRepository>(); StoryMarkAsSpam spam = (StoryMarkAsSpam)repository.FindById(Id, byUser.Id); repository.Remove(spam); StoryMarkAsSpams.Remove(spam); LastActivityAt = at; return(true); } return(false); }