1 implementation of ContentRootPath
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
24
public string
ContentRootPath
{ get; set; } = default!;
1 write to ContentRootPath
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironmentExtensions.cs (1)
23
hostingEnvironment.
ContentRootPath
= contentRootPath;
10 references to ContentRootPath
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
57
private async Task ContentRootPath(HttpContext ctx) => await ctx.Response.WriteAsync(ctx.RequestServices.GetService<Microsoft.AspNetCore.Hosting.IHostingEnvironment>().
ContentRootPath
);
187
File.WriteAllText(System.IO.Path.Combine(hostingEnv.
ContentRootPath
, "Started.txt"), "");
Microsoft.AspNetCore.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (3)
24
hostingEnvironment.ContentRootFileProvider = new PhysicalFileProvider(hostingEnvironment.
ContentRootPath
);
30
var wwwroot = Path.Combine(hostingEnvironment.
ContentRootPath
, "wwwroot");
38
hostingEnvironment.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)
662
Assert.Equal("/", host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().
ContentRootPath
);
680
var basePath2 = host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().
ContentRootPath
;
703
Assert.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
"/>).