示例#1
0
文件: Story.cs 项目: aoki1210/kigg
        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);
        }