Ejemplo n.º 1
0
        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);
                StoryMarkAsSpamsInternal.Remove((StoryMarkAsSpam)spam);

                LastActivityAt = at;

                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public bool MarkAsSpam(DateTime at, IUser byUser, string fromIpAddress)
        {
            Check.Argument.IsNotInFuture(at, "at");
            Check.Argument.IsNotNull(byUser, "byUser");
            Check.Argument.IsNotEmpty(fromIpAddress, "fromIpAddress");

            if (CanMarkAsSpam(byUser))
            {
                var spamStory = this.MarkSpam(at, byUser, fromIpAddress);
                StoryMarkAsSpamsInternal.Add((StoryMarkAsSpam)spamStory);

                LastActivityAt = at;

                return(true);
            }

            return(false);
        }