예제 #1
0
        public virtual void UnmarkAsSpam(IStory theStory, IUser byUser)
        {
            Check.Argument.IsNotNull(theStory, "theStory");
            Check.Argument.IsNotNull(byUser, "byUser");

            if (theStory.UnmarkAsSpam(SystemTime.Now(), byUser))
            {
                _userScoreService.StoryUnmarkedAsSpam(theStory, byUser);
            }
        }
예제 #2
0
        public virtual void UnmarkAsSpam(IStory theStory, IUser byUser)
        {
            Check.Argument.IsNotNull(theStory, "theStory");
            Check.Argument.IsNotNull(byUser, "byUser");

            using (IUnitOfWork unitOfWork = UnitOfWork.Begin())
            {
                if (theStory.UnmarkAsSpam(SystemTime.Now(), byUser))
                {
                    _eventAggregator.GetEvent <StoryUnmarkAsSpamEvent>().Publish(new StoryUnmarkAsSpamEventArgs(theStory, byUser));

                    unitOfWork.Commit();
                }
            }
        }