/*private readonly ILogger _logger;*/ public OscriptViewComponentInvokerFactory( IViewComponentFactory viewComponentFactory /*ILoggerFactory loggerFactory*/) { _viewComponentFactory = viewComponentFactory; //_logger = loggerFactory.CreateLogger<OscriptViewComponentInvoker>(); }
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>(); }
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; }
/// <summary> /// Initializes a new instance of <see cref="DefaultViewComponentInvoker"/>. /// </summary> /// <param name="viewComponentFactory">The <see cref="IViewComponentFactory"/>.</param> /// <param name="viewComponentInvokerCache">The <see cref="ViewComponentInvokerCache"/>.</param> /// <param name="diagnosticSource">The <see cref="DiagnosticSource"/>.</param> /// <param name="logger">The <see cref="ILogger"/>.</param> public DefaultViewComponentInvoker( IViewComponentFactory viewComponentFactory, ViewComponentInvokerCache viewComponentInvokerCache, DiagnosticSource diagnosticSource, ILogger logger) { 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 (logger == null) { throw new ArgumentNullException(nameof(logger)); } _viewComponentFactory = viewComponentFactory; _viewComponentInvokerCache = viewComponentInvokerCache; _diagnosticSource = diagnosticSource; _logger = logger; }
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>(); }
public MonoRailHttpHandler(String url, IViewEngine viewEngine, IControllerFactory controllerFactory, ControllerDescriptorBuilder controllerDescriptorBuilder, IFilterFactory filterFactory, IResourceFactory resourceFactory, IScaffoldingSupport scaffoldingSupport, IViewComponentFactory viewCompFactory, IMonoRailExtension[] extensions, IEmailSender sender) : base(controllerFactory, controllerDescriptorBuilder, viewEngine, filterFactory, resourceFactory, scaffoldingSupport, viewCompFactory, extensions, sender) { _url = url; }
/// <summary> /// Creates a new <see cref="ProfilingViewComponentInvokerFactory"/>. /// </summary> /// <param name="viewComponentFactory">The <see cref="IViewComponentFactory"/>.</param> /// <param name="viewComponentInvokerCache">The <see cref="ViewComponentInvokerCache"/>.</param> /// <param name="diagnosticSource">The <see cref="DiagnosticSource"/>.</param> /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> public ProfilingViewComponentInvokerFactory( IViewComponentFactory viewComponentFactory, ViewComponentInvokerCache viewComponentInvokerCache, DiagnosticSource diagnosticSource, ILoggerFactory loggerFactory) { _viewComponentFactory = viewComponentFactory ?? throw new ArgumentNullException(nameof(viewComponentFactory)); _viewComponentInvokerCache = viewComponentInvokerCache ?? throw new ArgumentNullException(nameof(viewComponentInvokerCache)); _diagnosticSource = diagnosticSource ?? throw new ArgumentNullException(nameof(diagnosticSource)); _logger = (loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory))).CreateLogger <ProfilingViewComponentInvoker>(); }
private IViewComponentFactory GetViewComponentFactory() { IViewComponentFactory compFactory = NVelocityViewEngine.StaticViewComponentFactory; if (compFactory == null) { throw new RailsException("NVelocityViewEngine: Could not obtain ViewComponentFactory instance"); } return(compFactory); }
public ProcessEngine(IControllerFactory controllerFactory, ControllerDescriptorBuilder controllerDescriptorBuilder, IViewEngine viewEngine, IFilterFactory filterFactory, IResourceFactory resourceFactory, IScaffoldingSupport scaffoldingSupport, IViewComponentFactory viewCompFactory, IMonoRailExtension[] extensions, IEmailSender emailSender) { this.controllerFactory = controllerFactory; this.extensionComposite = new ExtensionComposite(extensions); AddService(typeof(IControllerFactory), controllerFactory); AddService(typeof(IViewEngine), viewEngine); AddService(typeof(IFilterFactory), filterFactory); AddService(typeof(IResourceFactory), resourceFactory); AddService(typeof(IScaffoldingSupport), scaffoldingSupport); AddService(typeof(IViewComponentFactory), viewCompFactory); AddService(typeof(ControllerDescriptorBuilder), controllerDescriptorBuilder); AddService(typeof(IMonoRailExtension), extensionComposite); AddService(typeof(IEmailSender), emailSender); }
public OscriptViewComponentInvoker(IViewComponentFactory factory) { _viewComponentFactory = factory; }
public ComponentDirective(IViewComponentFactory viewComponentFactory, IViewEngine viewEngine) : base(viewComponentFactory, viewEngine) { }
public ComponentDirective(IViewComponentFactory viewComponentFactory) : base(viewComponentFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="AbstractComponentDirective"/> class. /// </summary> /// <param name="viewComponentFactory">The view component factory.</param> /// <param name="viewEngine">The view engine instance</param> public AbstractComponentDirective(IViewComponentFactory viewComponentFactory, IViewEngine viewEngine) { this.viewComponentFactory = viewComponentFactory; this.viewEngine = viewEngine; }
public BlockComponentDirective(IViewComponentFactory viewComponentFactory, IViewEngine viewEngine) : base(viewComponentFactory, viewEngine) { }
/// <summary> /// Initializes a new instance of the <see cref="AbstractComponentDirective"/> class. /// </summary> /// <param name="viewComponentFactory">The view component factory.</param> /// <param name="viewEngine">The view engine instance</param> public AbstractComponentDirective(IViewComponentFactory viewComponentFactory, IViewEngine viewEngine) { this.viewComponentFactory = viewComponentFactory; this.viewEngine = viewEngine; }
public ProcessEngine(IControllerFactory controllerFactory, ControllerDescriptorBuilder controllerDescriptorBuilder, IViewEngine viewEngine, IViewComponentFactory viewCompFactory) : this(controllerFactory, controllerDescriptorBuilder, viewEngine, new DefaultFilterFactory(), new DefaultResourceFactory(), null, viewCompFactory, new IMonoRailExtension[0], null) { }
public AbstractComponentDirective(IViewComponentFactory viewComponentFactory) { this.viewComponentFactory = viewComponentFactory; }