/// <summary> /// Initializes a new instance of the <see cref="PublishedContentRequest"/> class with a specific Uri and routing context. /// </summary> /// <param name="routingContext">A routing context.</param> /// <param name="templateService"></param> /// <param name="loggerFactor"></param> /// <param name="httpContextAccessor"></param> public PublishedContentRequest(RoutingContext routingContext, ITemplateService templateService, ILoggerFactory loggerFactor, IHttpContextAccessor httpContextAccessor) { if (routingContext == null) throw new ArgumentNullException("routingContext"); if (templateService == null) throw new ArgumentNullException(nameof(templateService)); _templateService = templateService; RoutingContext = routingContext; _engine = new PublishedContentRequestEngine(templateService, this, loggerFactor, httpContextAccessor); }
/// <summary> /// Initializes a new instance of the <see cref="PublishedContentRequest"/> class with a specific Uri and routing context. /// </summary> /// <param name="uri">The request <c>Uri</c>.</param> /// <param name="routingContext">A routing context.</param> internal PublishedContentRequest(Uri uri, RoutingContext routingContext) { if (uri == null) throw new ArgumentNullException("uri"); if (routingContext == null) throw new ArgumentNullException("routingContext"); Uri = uri; RoutingContext = routingContext; _engine = new PublishedContentRequestEngine(this); RenderingEngine = RenderingEngine.Unknown; }
/// <summary> /// Initializes a new instance of the <see cref="PublishedContentRequest"/> class with a specific Uri and routing context. /// </summary> /// <param name="routingContext">A routing context.</param> /// <param name="templateService"></param> /// <param name="loggerFactor"></param> /// <param name="httpContextAccessor"></param> public PublishedContentRequest(RoutingContext routingContext, ITemplateService templateService, ILoggerFactory loggerFactor, IHttpContextAccessor httpContextAccessor) { if (routingContext == null) { throw new ArgumentNullException("routingContext"); } if (templateService == null) { throw new ArgumentNullException(nameof(templateService)); } _templateService = templateService; RoutingContext = routingContext; _engine = new PublishedContentRequestEngine(templateService, this, loggerFactor, httpContextAccessor); }
/// <summary> /// Initializes a new instance of the <see cref="PublishedContentRequest"/> class with a specific Uri and routing context. /// </summary> /// <param name="uri">The request <c>Uri</c>.</param> /// <param name="routingContext">A routing context.</param> internal PublishedContentRequest(Uri uri, RoutingContext routingContext) { if (uri == null) { throw new ArgumentNullException("uri"); } if (routingContext == null) { throw new ArgumentNullException("routingContext"); } Uri = uri; RoutingContext = routingContext; _engine = new PublishedContentRequestEngine(this); RenderingEngine = RenderingEngine.Unknown; }
/// <summary> /// Initializes a new instance of the <see cref="PublishedContentRequest"/> class with a specific Uri and routing context. /// </summary> /// <param name="uri">The request <c>Uri</c>.</param> /// <param name="routingContext">A routing context.</param> /// <param name="getRolesForLogin">A callback method to return the roles for the provided login name when required</param> /// <param name="routingConfig"></param> public PublishedContentRequest(Uri uri, RoutingContext routingContext, IWebRoutingSection routingConfig, Func <string, IEnumerable <string> > getRolesForLogin) { if (uri == null) { throw new ArgumentNullException("uri"); } if (routingContext == null) { throw new ArgumentNullException("routingContext"); } Uri = uri; RoutingContext = routingContext; GetRolesForLogin = getRolesForLogin; _engine = new PublishedContentRequestEngine( routingConfig, this); RenderingEngine = RenderingEngine.Unknown; }