Пример #1
0
 /// <summary>
 /// Used for adding support for unit-testing. Do not make this constructor public
 /// </summary>
 internal ReportService(ILogger log, IMarkdownReportCreator markdownReportCreator, IExceptionHandler exceptionHandler, IQueryManager queryManager, ISourceControlManager sourceControlManager)
 {
     _log = log;
     _markdownReportCreator = markdownReportCreator;
     _exceptionHandler      = exceptionHandler;
     _queryManager          = queryManager;
     _sourceControlManager  = sourceControlManager;
 }
Пример #2
0
        public ReportService(ILogger log, ISettings settings)
        {
            if (_dependencyResolver == null)
            {
                _dependencyResolver = new Container(new ServiceRegistry(log, settings));
            }

            _log      = log;
            _settings = settings;
            _markdownReportCreator = _dependencyResolver.GetInstance <IMarkdownReportCreator>();
            _exceptionHandler      = _dependencyResolver.GetInstance <IExceptionHandler>();
            _queryManager          = _dependencyResolver.GetInstance <IQueryManager>();
            _sourceControlManager  = _dependencyResolver.GetInstance <ISourceControlManager>();
        }