public DefaultViewComponentInvokerFactory(
            IViewComponentFactory viewComponentFactory,
            ViewComponentInvokerCache viewComponentInvokerCache,
            DiagnosticSource diagnosticSource,
            ILoggerFactory loggerFactory)
        {
            if (viewComponentFactory == null)
            {
                throw new ArgumentNullException(nameof(viewComponentFactory));
            }

            if (viewComponentInvokerCache == null)
            {
                throw new ArgumentNullException(nameof(viewComponentInvokerCache));
            }

            if (diagnosticSource == null)
            {
                throw new ArgumentNullException(nameof(diagnosticSource));
            }

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            _viewComponentFactory      = viewComponentFactory;
            _diagnosticSource          = diagnosticSource;
            _viewComponentInvokerCache = viewComponentInvokerCache;

            _logger = loggerFactory.CreateLogger <DefaultViewComponentInvoker>();
        }
Beispiel #2
0
        public DefaultViewComponentInvoker(
            IViewComponentFactory viewComponentFactory,
            ViewComponentInvokerCache viewComponentInvokerCache,
            DiagnosticListener diagnosticListener,
            ILogger logger)
        {
            if (viewComponentFactory == null)
            {
                throw new ArgumentNullException(nameof(viewComponentFactory));
            }

            if (viewComponentInvokerCache == null)
            {
                throw new ArgumentNullException(nameof(viewComponentInvokerCache));
            }

            if (diagnosticListener == null)
            {
                throw new ArgumentNullException(nameof(diagnosticListener));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            _viewComponentFactory      = viewComponentFactory;
            _viewComponentInvokerCache = viewComponentInvokerCache;
            _diagnosticListener        = diagnosticListener;
            _logger = logger;
        }
Beispiel #3
0
        public DefaultViewComponentInvokerFactory(
            IViewComponentFactory viewComponentFactory,
#pragma warning disable PUB0001 // Pubternal type in public API
            ViewComponentInvokerCache viewComponentInvokerCache,
#pragma warning restore PUB0001
            DiagnosticSource diagnosticSource,
            ILoggerFactory loggerFactory)
        {
            if (viewComponentFactory == null)
            {
                throw new ArgumentNullException(nameof(viewComponentFactory));
            }

            if (viewComponentInvokerCache == null)
            {
                throw new ArgumentNullException(nameof(viewComponentInvokerCache));
            }

            if (diagnosticSource == null)
            {
                throw new ArgumentNullException(nameof(diagnosticSource));
            }

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            _viewComponentFactory      = viewComponentFactory;
            _diagnosticSource          = diagnosticSource;
            _viewComponentInvokerCache = viewComponentInvokerCache;

            _logger = loggerFactory.CreateLogger <DefaultViewComponentInvoker>();
        }