10 implementations of WebRootFileProvider
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
292public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } }
HotReloadServiceTests.cs (1)
279public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } }
RazorComponentEndpointDataSourceTest.cs (1)
295public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } }
RazorComponentEndpointInvokerTest.cs (1)
57public IFileProvider WebRootFileProvider { get => new NullFileProvider(); set => throw new NotImplementedException(); }
RazorComponentsServiceCollectionExtensionsTest.cs (1)
142public IFileProvider WebRootFileProvider { get; set; } = new NullFileProvider();
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Infrastructure\TestWebHostEnvironment.cs (1)
11public IFileProvider WebRootFileProvider { get; set; }
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
22public IFileProvider WebRootFileProvider { get; set; } = default!;
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
264public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } }
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
340public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } }
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaServicesExtensionsTests.cs (1)
108public IFileProvider WebRootFileProvider { get; set; }
4 writes to WebRootFileProvider
Microsoft.AspNetCore.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (2)
99hostingEnvironment.WebRootFileProvider = new PhysicalFileProvider(hostingEnvironment.WebRootPath); 103hostingEnvironment.WebRootFileProvider = new NullFileProvider();
StaticWebAssets\StaticWebAssetsLoader.cs (1)
43environment.WebRootFileProvider = new CompositeFileProvider(new[] { provider, environment.WebRootFileProvider });
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
597builder.Environment.WebRootFileProvider = new TestFileProvider(new TestResource[]
72 references to WebRootFileProvider
Identity.DefaultUI.WebSite (1)
StartupBase.cs (1)
88pendingProviders.Push(env.WebRootFileProvider);
Microsoft.AspNetCore (3)
GenericHostBuilderExtensions.cs (2)
23/// <item><description>configure <see cref="IWebHostEnvironment.WebRootFileProvider"/> to include static web assets from projects referenced by the entry assembly during development</description></item> 48/// <item><description>configure <see cref="IWebHostEnvironment.WebRootFileProvider"/> to include static web assets from projects referenced by the entry assembly during development</description></item>
WebHost.cs (1)
148/// configure the <see cref="IWebHostEnvironment.WebRootFileProvider"/> to map static web assets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly,
Microsoft.AspNetCore.Components.Server (1)
Circuits\CircuitOptionsJavaScriptInitializersConfiguration.cs (1)
21var file = _environment.WebRootFileProvider.GetFileInfo($"{_environment.ApplicationName}.modules.json");
Microsoft.AspNetCore.Components.Server.Tests (1)
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
129environment.SetupGet(e => e.WebRootFileProvider).Returns(new NullFileProvider());
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
40var options = CreateStaticFilesOptions(webHostEnvironment.WebRootFileProvider);
ContentEncodingNegotiator.cs (1)
117_webHostEnvironment.WebRootFileProvider.GetFileInfo(context.Request.Path + extension).Exists;
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (1)
ContentEncodingNegotiatorTests.cs (1)
224env.Setup(e => e.WebRootFileProvider).Returns(fileProviderMock.Object);
Microsoft.AspNetCore.Hosting (2)
StaticWebAssets\StaticWebAssetsLoader.cs (1)
43environment.WebRootFileProvider = new CompositeFileProvider(new[] { provider, environment.WebRootFileProvider });
WebHostBuilderExtensions.cs (1)
247/// Configures the <see cref="IWebHostEnvironment.WebRootFileProvider"/> to use static web assets
Microsoft.AspNetCore.Hosting.Tests (4)
HostingEnvironmentExtensionsTests.cs (3)
29Assert.IsAssignableFrom<PhysicalFileProvider>(env.WebRootFileProvider); 42Assert.IsAssignableFrom<PhysicalFileProvider>(env.WebRootFileProvider); 55Assert.IsAssignableFrom<NullFileProvider>(env.WebRootFileProvider);
WebHostTests.cs (1)
849Assert.True(env.WebRootFileProvider.GetFileInfo("TextFile.txt").Exists);
Microsoft.AspNetCore.Http.Results (4)
Results.cs (1)
466/// <param name="path">The path to the file. When not rooted, resolves the path relative to <see cref="IWebHostEnvironment.WebRootFileProvider"/>.</param>
TypedResults.cs (2)
495/// <param name="path">The path to the file. When not rooted, resolves the path relative to <see cref="IWebHostEnvironment.WebRootFileProvider"/>.</param> 528/// <param name="path">The path to the file. When not rooted, resolves the path relative to <see cref="IWebHostEnvironment.WebRootFileProvider"/>.</param>
VirtualFileHttpResult.cs (1)
108var fileInfo = GetFileInformation(hostingEnvironment.WebRootFileProvider);
Microsoft.AspNetCore.Http.Results.Tests (10)
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (10)
47appEnvironment.Setup(app => app.WebRootFileProvider) 84appEnvironment.Setup(app => app.WebRootFileProvider) 121appEnvironment.Setup(app => app.WebRootFileProvider) 154appEnvironment.Setup(app => app.WebRootFileProvider) 190appEnvironment.Setup(app => app.WebRootFileProvider) 224appEnvironment.Setup(app => app.WebRootFileProvider) 260appEnvironment.Setup(app => app.WebRootFileProvider) 291appEnvironment.Setup(app => app.WebRootFileProvider) 330appEnvironment.Setup(app => app.WebRootFileProvider) 489var hostingEnvironment = Mock.Of<IWebHostEnvironment>(e => e.WebRootFileProvider == webRootFileProvider);
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\VirtualFileResultExecutor.cs (1)
130result.FileProvider = hostingEnvironment.WebRootFileProvider;
Microsoft.AspNetCore.Mvc.Core.Test (12)
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (10)
47appEnvironment.Setup(app => app.WebRootFileProvider) 84appEnvironment.Setup(app => app.WebRootFileProvider) 121appEnvironment.Setup(app => app.WebRootFileProvider) 154appEnvironment.Setup(app => app.WebRootFileProvider) 190appEnvironment.Setup(app => app.WebRootFileProvider) 224appEnvironment.Setup(app => app.WebRootFileProvider) 260appEnvironment.Setup(app => app.WebRootFileProvider) 291appEnvironment.Setup(app => app.WebRootFileProvider) 330appEnvironment.Setup(app => app.WebRootFileProvider) 489var hostingEnvironment = Mock.Of<IWebHostEnvironment>(e => e.WebRootFileProvider == webRootFileProvider);
VirtualFileResultTest.cs (2)
53var webHostEnvironment = Mock.Of<IWebHostEnvironment>(e => e.WebRootFileProvider == webHostFileProvider); 70var webHostEnvironment = Mock.Of<IWebHostEnvironment>(e => e.WebRootFileProvider == webHostFileProvider);
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultFileVersionProvider.cs (1)
28FileProvider = hostingEnvironment.WebRootFileProvider;
Microsoft.AspNetCore.Mvc.TagHelpers (2)
LinkTagHelper.cs (1)
475HostingEnvironment.WebRootFileProvider,
ScriptTagHelper.cs (1)
463HostingEnvironment.WebRootFileProvider,
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
DefaultFileVersionProviderTest.cs (1)
290var hostingEnv = Mock.Of<IWebHostEnvironment>(e => e.WebRootFileProvider == fileProvider);
ImageTagHelperTest.cs (1)
376hostingEnvironment.Setup(h => h.WebRootFileProvider).Returns(mockFileProvider.Object);
LinkTagHelperTest.cs (1)
1186hostingEnvironment.Setup(h => h.WebRootFileProvider).Returns(mockFileProvider.Object);
ScriptTagHelperTest.cs (1)
1153hostingEnvironment.Setup(h => h.WebRootFileProvider).Returns(mockFileProvider.Object);
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
676environment.Setup(e => e.WebRootFileProvider)
Microsoft.AspNetCore.Rewrite (1)
RewriteMiddleware.cs (1)
43_fileProvider = _options.StaticFileProvider ?? hostingEnvironment.WebRootFileProvider;
Microsoft.AspNetCore.StaticAssets (5)
Development\StaticAssetDevelopmentRuntimeHandler.cs (3)
44var fileInfo = context.RequestServices.GetRequiredService<IWebHostEnvironment>().WebRootFileProvider.GetFileInfo(asset.AssetPath); 95var fileInfo = _context.RequestServices.GetRequiredService<IWebHostEnvironment>().WebRootFileProvider.GetFileInfo(_asset.AssetPath); 209var fileInfo = environment.WebRootFileProvider.GetFileInfo(ctx.Request.Path);
StaticAssetEndpointFactory.cs (1)
42var fileProvider = serviceProvider.GetRequiredService<IWebHostEnvironment>().WebRootFileProvider;
StaticAssetsInvoker.cs (1)
166if (!environment.IsDevelopment() && environment.WebRootFileProvider is not CompositeFileProvider)
Microsoft.AspNetCore.StaticFiles (13)
DefaultFilesExtensions.cs (2)
23/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder. 40/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder.
DirectoryBrowserExtensions.cs (2)
23/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder. 40/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder.
FileServerExtensions.cs (3)
22/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder. 39/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder. 59/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder.
Helpers.cs (2)
15if (hostingEnv.WebRootFileProvider == null) 19return hostingEnv.WebRootFileProvider;
Infrastructure\SharedOptionsBase.cs (1)
46/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder.
StaticFileExtensions.cs (2)
23/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder. 40/// or <see cref="IWebHostEnvironment.WebRootFileProvider"/> which defaults to the 'wwwroot' subfolder.
StaticFileMiddleware.cs (1)
47if (_fileProvider is NullFileProvider && _fileProvider == hostingEnv.WebRootFileProvider)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (3)
FallbackStaticFileTest.cs (1)
124var fileInfo = environment.WebRootFileProvider.GetFileInfo(filePath);
StaticFileMiddlewareTests.cs (2)
158var fileInfo = hostingEnvironment.WebRootFileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 200var fileInfo = hostingEnvironment.WebRootFileProvider.GetFileInfo(Path.GetFileName(requestUrl));