Beispiel #1
0
        public PageAnalysisService(IScoreService scoreService, IByteSizeHelper byteSizeHelper, IEnumerable <ISummary> summaries,
                                   ITemplateHelper templateHelper, INodeReportRepository nodeReportService, IPageScoreSerializer pageScoreSerializer)
        {
            if (scoreService == null)
            {
                throw new ArgumentNullException(nameof(scoreService));
            }
            if (byteSizeHelper == null)
            {
                throw new ArgumentNullException(nameof(byteSizeHelper));
            }
            if (summaries == null)
            {
                throw new ArgumentNullException(nameof(summaries));
            }
            if (templateHelper == null)
            {
                throw new ArgumentNullException(nameof(templateHelper));
            }
            if (nodeReportService == null)
            {
                throw new ArgumentNullException(nameof(nodeReportService));
            }
            if (pageScoreSerializer == null)
            {
                throw new ArgumentNullException(nameof(pageScoreSerializer));
            }

            _scoreService         = scoreService;
            _byteSizeHelper       = byteSizeHelper;
            _summaries            = summaries;
            _templateHelper       = templateHelper;
            _nodeReportRepository = nodeReportService;
            _pageScoreSerializer  = pageScoreSerializer;
        }
Beispiel #2
0
        public HtmlSizeAnalyzer(IByteSizeHelper byteSizeHelper, IOptionHelper optionHelper) : base()
        {
            if (byteSizeHelper == null)
            {
                throw new ArgumentNullException(nameof(byteSizeHelper));
            }
            if (optionHelper == null)
            {
                throw new ArgumentNullException(nameof(optionHelper));
            }

            _byteSizeHelper = byteSizeHelper;
            _optionHelper   = optionHelper;
        }