Exemple #1
0
 public SpaFileProvider(EmbeddedFileProvider inner, SpaUIOptions options)
 {
     _inner   = inner ?? throw new ArgumentNullException(nameof(inner));
     _options = options ?? throw new ArgumentNullException(nameof(options));
 }
Exemple #2
0
 public SpaIndexFileInfo(IFileInfo template, SpaUIOptions options)
 {
     _template = template ?? throw new ArgumentNullException(nameof(template));
     _options  = options ?? throw new ArgumentNullException(nameof(options));
 }
Exemple #3
0
 /// <summary>
 /// Constructs a new instance of <see cref="SpaUIMiddleware"/>.
 /// </summary>
 /// <param name="options">Options for configuring <see cref="SpaUIMiddleware"/> middleware.</param>
 /// <param name="embeddedUIRoot">Embedded UI root folder name.</param>
 /// <param name="assembly">The assembly containing the embedded resources.</param>
 /// <param name="loggerFactory">Represents a type used to configure the logging system.</param>
 /// <param name="hostingEnvironment">Provides information about the web hosting environment an application is running in.</param>
 /// <param name="next">A function that can process an HTTP request.</param>
 public SpaUIMiddleware(SpaUIOptions options, string embeddedUIRoot, Assembly assembly, ILoggerFactory loggerFactory, IWebHostEnvironment hostingEnvironment, RequestDelegate next)
 {
     _options = options ?? new SpaUIOptions();
     _next    = next;
     _staticFileMiddleware = CreateStaticFileMiddleware(hostingEnvironment, loggerFactory, embeddedUIRoot, assembly);
 }