10 implementations of WebRootPath
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
291
public string
WebRootPath
{ get; set; } = "";
HotReloadServiceTests.cs (1)
278
public string
WebRootPath
{ get; set; } = "";
RazorComponentEndpointDataSourceTest.cs (1)
294
public string
WebRootPath
{ get; set; } = "";
RazorComponentEndpointInvokerTest.cs (1)
56
public string
WebRootPath
{ get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
RazorComponentsServiceCollectionExtensionsTest.cs (1)
141
public string
WebRootPath
{ get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Infrastructure\TestWebHostEnvironment.cs (1)
12
public string
WebRootPath
{ get; set; }
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
20
public string
WebRootPath
{ get; set; } = default!;
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
263
public string
WebRootPath
{ get; set; } = "";
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
339
public string
WebRootPath
{ get; set; } = "";
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaServicesExtensionsTests.cs (1)
106
public string
WebRootPath
{ get; set; } = Directory.GetCurrentDirectory();
3 writes to WebRootPath
Microsoft.AspNetCore.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (3)
84
hostingEnvironment.
WebRootPath
= wwwroot;
89
hostingEnvironment.
WebRootPath
= Path.Combine(hostingEnvironment.ContentRootPath, webRoot);
94
hostingEnvironment.
WebRootPath
= Path.GetFullPath(hostingEnvironment.WebRootPath);
32 references to WebRootPath
Microsoft.AspNetCore (2)
ConfigureWebHostBuilder.cs (2)
41
var previousWebRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.
WebRootPath
, previousContentRoot);
117
var previousWebRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.
WebRootPath
);
Microsoft.AspNetCore.Hosting (5)
Internal\HostingEnvironmentExtensions.cs (5)
92
if (!string.IsNullOrEmpty(hostingEnvironment.
WebRootPath
))
94
hostingEnvironment.WebRootPath = Path.GetFullPath(hostingEnvironment.
WebRootPath
);
95
if (!Directory.Exists(hostingEnvironment.
WebRootPath
))
97
Directory.CreateDirectory(hostingEnvironment.
WebRootPath
);
99
hostingEnvironment.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)
27
Assert.Equal(Path.GetFullPath("testroot"), env.
WebRootPath
);
40
Assert.Equal(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), env.
WebRootPath
);
53
Assert.Null(env.
WebRootPath
);
WebHostTests.cs (1)
848
Assert.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)
48
FileProvider = new PhysicalFileProvider(Path.Combine(environment.
WebRootPath
, "SubFolder")),
Microsoft.AspNetCore.Tests (7)
WebApplicationTests.cs (7)
515
Assert.Equal(fullWebRootPath, builder.Environment.
WebRootPath
);
544
Assert.Equal(fullWebRootPath, builder.Environment.
WebRootPath
);
586
Assert.Equal(fullWebRootPath, builder.Environment.
WebRootPath
);
817
Assert.Equal(fullWebRootPath, builder.Environment.
WebRootPath
);
866
Assert.Equal(fullWebRootPath, builder.Environment.
WebRootPath
);
912
Assert.Equal(fullWebRootPath, builder.Environment.
WebRootPath
);
2230
Assert.Equal(wwwroot, hostEnv.
WebRootPath
);
SimpleWebSiteWithWebApplicationBuilder (1)
Program.cs (1)
43
app.MapGet("/webroot", (IWebHostEnvironment environment) => environment.
WebRootPath
);