10 implementations of WebRootPath
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
291public string WebRootPath { get; set; } = "";
HotReloadServiceTests.cs (1)
278public string WebRootPath { get; set; } = "";
RazorComponentEndpointDataSourceTest.cs (1)
294public string WebRootPath { get; set; } = "";
RazorComponentEndpointInvokerTest.cs (1)
56public string WebRootPath { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
RazorComponentsServiceCollectionExtensionsTest.cs (1)
141public string WebRootPath { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Infrastructure\TestWebHostEnvironment.cs (1)
12public string WebRootPath { get; set; }
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
20public string WebRootPath { get; set; } = default!;
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
263public string WebRootPath { get; set; } = "";
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
339public string WebRootPath { get; set; } = "";
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaServicesExtensionsTests.cs (1)
106public string WebRootPath { get; set; } = Directory.GetCurrentDirectory();
3 writes to WebRootPath
Microsoft.AspNetCore.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (3)
84hostingEnvironment.WebRootPath = wwwroot; 89hostingEnvironment.WebRootPath = Path.Combine(hostingEnvironment.ContentRootPath, webRoot); 94hostingEnvironment.WebRootPath = Path.GetFullPath(hostingEnvironment.WebRootPath);
32 references to WebRootPath
Microsoft.AspNetCore (2)
ConfigureWebHostBuilder.cs (2)
41var previousWebRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.WebRootPath, previousContentRoot); 117var previousWebRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.WebRootPath);
Microsoft.AspNetCore.Hosting (5)
Internal\HostingEnvironmentExtensions.cs (5)
92if (!string.IsNullOrEmpty(hostingEnvironment.WebRootPath)) 94hostingEnvironment.WebRootPath = Path.GetFullPath(hostingEnvironment.WebRootPath); 95if (!Directory.Exists(hostingEnvironment.WebRootPath)) 97Directory.CreateDirectory(hostingEnvironment.WebRootPath); 99hostingEnvironment.WebRootFileProvider = new PhysicalFileProvider(hostingEnvironment.WebRootPath);
Microsoft.AspNetCore.Hosting.Abstractions (1)
IWebHostEnvironment.cs (1)
21/// Gets or sets an <see cref="IFileProvider"/> pointing at <see cref="WebRootPath"/>.
Microsoft.AspNetCore.Hosting.Tests (4)
HostingEnvironmentExtensionsTests.cs (3)
27Assert.Equal(Path.GetFullPath("testroot"), env.WebRootPath); 40Assert.Equal(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), env.WebRootPath); 53Assert.Null(env.WebRootPath);
WebHostTests.cs (1)
848Assert.Equal(Path.GetFullPath("testroot"), env.WebRootPath);
Microsoft.AspNetCore.StaticFiles (11)
DefaultFilesExtensions.cs (2)
22/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/> 39/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/>
DirectoryBrowserExtensions.cs (2)
22/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/> 39/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/>
FileServerExtensions.cs (3)
21/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/> 38/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/> 58/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/>
Infrastructure\SharedOptionsBase.cs (1)
45/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/>
StaticFileExtensions.cs (2)
22/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/> 39/// Files are served from the path specified in <see cref="IWebHostEnvironment.WebRootPath"/>
StaticFileMiddleware.cs (1)
49_logger.WebRootPathNotFound(Path.GetFullPath(Path.Combine(hostingEnv.ContentRootPath, hostingEnv.WebRootPath ?? "wwwroot")));
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
FallbackStaticFileTest.cs (1)
48FileProvider = new PhysicalFileProvider(Path.Combine(environment.WebRootPath, "SubFolder")),
Microsoft.AspNetCore.Tests (7)
WebApplicationTests.cs (7)
515Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 544Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 586Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 817Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 866Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 912Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 2230Assert.Equal(wwwroot, hostEnv.WebRootPath);
SimpleWebSiteWithWebApplicationBuilder (1)
Program.cs (1)
43app.MapGet("/webroot", (IWebHostEnvironment environment) => environment.WebRootPath);