1 implementation of ContentRootPath
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
24public string ContentRootPath { get; set; } = default!;
1 write to ContentRootPath
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironmentExtensions.cs (1)
23hostingEnvironment.ContentRootPath = contentRootPath;
10 references to ContentRootPath
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
57private async Task ContentRootPath(HttpContext ctx) => await ctx.Response.WriteAsync(ctx.RequestServices.GetService<Microsoft.AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath); 187File.WriteAllText(System.IO.Path.Combine(hostingEnv.ContentRootPath, "Started.txt"), "");
Microsoft.AspNetCore.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (3)
24hostingEnvironment.ContentRootFileProvider = new PhysicalFileProvider(hostingEnvironment.ContentRootPath); 30var wwwroot = Path.Combine(hostingEnvironment.ContentRootPath, "wwwroot"); 38hostingEnvironment.WebRootPath = Path.Combine(hostingEnvironment.ContentRootPath, webRoot);
Microsoft.AspNetCore.Hosting.Abstractions (1)
IHostingEnvironment.cs (1)
46/// Gets or sets an <see cref="IFileProvider"/> pointing at <see cref="ContentRootPath"/>.
Microsoft.AspNetCore.Hosting.Tests (3)
WebHostBuilderTests.cs (3)
662Assert.Equal("/", host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath); 680var basePath2 = host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath; 703Assert.Equal(appBase, host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath);
Microsoft.AspNetCore.Mvc.RazorPages (1)
DependencyInjection\MvcRazorPagesMvcBuilderExtensions.cs (1)
53/// Configures Razor Pages to be rooted at the content root (<see cref="IHostingEnvironment.ContentRootPath"/>).