30 instantiations of StaticFileOptions
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
388_app.UseStaticFiles(new StaticFileOptions()
blazor-devserver (2)
Server\Startup.cs (2)
57app.UseStaticFiles(new StaticFileOptions 68endpoints.MapFallbackToFile("index.html", new StaticFileOptions
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
86var options = new StaticFileOptions();
Microsoft.AspNetCore.SpaServices.Extensions (2)
SpaDefaultPageMiddleware.cs (1)
38options.DefaultPageStaticFileOptions ?? new StaticFileOptions(),
StaticFiles\SpaStaticFilesExtensions.cs (1)
53UseSpaStaticFiles(applicationBuilder, new StaticFileOptions());
Microsoft.AspNetCore.StaticFiles (2)
FileServerOptions.cs (1)
19StaticFileOptions = new StaticFileOptions(SharedOptions);
StaticFileExtensions.cs (1)
46return app.UseStaticFiles(new StaticFileOptions
Microsoft.AspNetCore.StaticFiles.FunctionalTests (3)
FallbackStaticFileTest.cs (1)
46endpoints.MapFallbackToFile("default.html", new StaticFileOptions()
StaticFileMiddlewareTests.cs (2)
146.Configure(app => app.UseStaticFiles(new StaticFileOptions 188.Configure(app => app.UseStaticFiles(new StaticFileOptions
Microsoft.AspNetCore.StaticFiles.Tests (19)
StaticFileContextTest.cs (5)
19var options = new StaticFileOptions(); 39var options = new StaticFileOptions(); 65var options = new StaticFileOptions(); 94var options = new StaticFileOptions(); 121var options = new StaticFileOptions();
StaticFileMiddlewareTests.cs (14)
64.Configure(app => app.UseStaticFiles(new StaticFileOptions { ServeUnknownFileTypes = true })) 103app.UseStaticFiles(new StaticFileOptions { ServeUnknownFileTypes = true }); 123using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions 142using (await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = null }))) 146using (await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions { FileProvider = null }))) 179using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions 214using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions 254using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions 297using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions 350app.UseStaticFiles(new StaticFileOptions 398app.UseStaticFiles(new StaticFileOptions 454app.UseStaticFiles(new StaticFileOptions 472using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions 532using var host = await StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions
31 references to StaticFileOptions
Microsoft.AspNetCore.Components.WebAssembly.Server (3)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (3)
40var options = CreateStaticFilesOptions(webHostEnvironment.WebRootFileProvider); 84private static StaticFileOptions CreateStaticFilesOptions(IFileProvider webRootFileProvider) 86var options = new StaticFileOptions();
Microsoft.AspNetCore.SpaServices.Extensions (4)
SpaOptions.cs (2)
54/// Gets or sets the <see cref="StaticFileOptions"/> that supplies content 61public StaticFileOptions? DefaultPageStaticFileOptions { get; set; }
StaticFiles\SpaStaticFilesExtensions.cs (2)
62public static void UseSpaStaticFiles(this IApplicationBuilder applicationBuilder, StaticFileOptions options) 74StaticFileOptions staticFileOptions,
Microsoft.AspNetCore.StaticFiles (19)
FileServerOptions.cs (1)
28public StaticFileOptions StaticFileOptions { get; private set; }
StaticFileContext.cs (4)
19private readonly StaticFileOptions _options; 44public StaticFileContext(HttpContext context, StaticFileOptions options, ILogger logger, IFileProvider fileProvider, string? contentType, PathString subPath) 272if (_options.OnPrepareResponse != StaticFileOptions._defaultOnPrepareResponse || _options.OnPrepareResponseAsync != StaticFileOptions._defaultOnPrepareResponseAsync)
StaticFileExtensions.cs (1)
58public static IApplicationBuilder UseStaticFiles(this IApplicationBuilder app, StaticFileOptions options)
StaticFileMiddleware.cs (3)
18private readonly StaticFileOptions _options; 32public StaticFileMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnv, IOptions<StaticFileOptions> options, ILoggerFactory loggerFactory) 95internal static bool LookupContentType(IContentTypeProvider contentTypeProvider, StaticFileOptions options, PathString subPath, out string? contentType)
StaticFilesEndpointRouteBuilderExtensions.cs (10)
38/// The default <see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/> will be used. 66/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param> 70/// <see cref="MapFallbackToFile(IEndpointRouteBuilder, string, StaticFileOptions)"/> is intended to handle cases 76/// <see cref="MapFallbackToFile(IEndpointRouteBuilder, string, StaticFileOptions)"/> registers an endpoint using the pattern 85StaticFileOptions options) 112/// The default <see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/> will be used. 146/// <param name="options"><see cref="StaticFileOptions"/> for the <see cref="StaticFileMiddleware"/>.</param> 150/// <see cref="MapFallbackToFile(IEndpointRouteBuilder, string, string, StaticFileOptions)"/> is intended to handle 169StaticFileOptions options) 183StaticFileOptions? options = null)
Microsoft.AspNetCore.StaticFiles.Tests (5)
StaticFileContextTest.cs (5)
19var options = new StaticFileOptions(); 39var options = new StaticFileOptions(); 65var options = new StaticFileOptions(); 94var options = new StaticFileOptions(); 121var options = new StaticFileOptions();