示例#1
0
        public StoryService(IConfigurationSettings settings, IDomainObjectFactory factory, ICategoryRepository categoryRepository, ITagRepository tagRepository, IStoryRepository storyRepository, IMarkAsSpamRepository markAsSpamRepository, IEventAggregator eventAggregator, ISpamProtection spamProtection, ISpamPostprocessor spamPostprocessor, IContentService contentService, IHtmlSanitizer htmlSanitizer, IThumbnail thumbnail, IStoryWeightCalculator[] storyWeightCalculators, IVoteRepository voteRepository)
        {
            Check.Argument.IsNotNull(settings, "settings");
            Check.Argument.IsNotNull(factory, "factory");
            Check.Argument.IsNotNull(categoryRepository, "categoryRepository");
            Check.Argument.IsNotNull(tagRepository, "tagRepository");
            Check.Argument.IsNotNull(storyRepository, "storyRepository");
            Check.Argument.IsNotNull(markAsSpamRepository, "markAsSpamRepository");
            Check.Argument.IsNotNull(eventAggregator, "eventAggregator");
            Check.Argument.IsNotNull(spamProtection, "spamProtection");
            Check.Argument.IsNotNull(spamPostprocessor, "spamPostprocessor");
            Check.Argument.IsNotNull(contentService, "contentService");
            Check.Argument.IsNotNull(htmlSanitizer, "htmlSanitizer");
            Check.Argument.IsNotNull(thumbnail, "thumbnail");
            Check.Argument.IsNotEmpty(storyWeightCalculators, "storyWeightCalculators");
            Check.Argument.IsNotNull(voteRepository, "voteRepository");

            _settings               = settings;
            _factory                = factory;
            _categoryRepository     = categoryRepository;
            _tagRepository          = tagRepository;
            _storyRepository        = storyRepository;
            _markAsSpamRepository   = markAsSpamRepository;
            _eventAggregator        = eventAggregator;
            _spamProtection         = spamProtection;
            _spamPostprocessor      = spamPostprocessor;
            _contentService         = contentService;
            _htmlSanitizer          = htmlSanitizer;
            _thumbnail              = thumbnail;
            _storyWeightCalculators = storyWeightCalculators;
            _voteRepository         = voteRepository;
        }