9 implementations of ContentRootPath
Aspire.Dashboard.Tests (1)
BrowserSecurityHeadersMiddlewareTests.cs (1)
95public string ContentRootPath { get; set; } = "ContentRootPath";
Aspire.Hosting.Azure.Tests (1)
ProvisioningTestHelpers.cs (1)
591public string ContentRootPath { get; set; } = "/test";
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
1076public string ContentRootPath { get; set; } = "/test";
Aspire.Hosting.RemoteHost.Tests (1)
AtsExportsTests.cs (1)
77public string ContentRootPath { get; set; } = "/";
Aspire.Hosting.Tests (3)
Dashboard\DashboardServiceTests.cs (1)
612public string ContentRootPath { get; set; } = default!;
Dcp\DcpExecutorTests.cs (1)
2618public string ContentRootPath { get; set; } = default!;
Publishing\DeploymentStateManagerTests.cs (1)
510public string ContentRootPath { get; set; } = string.Empty;
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
24public string ContentRootPath { get; set; } = default!;
Microsoft.Extensions.Hosting (1)
Internal\HostingEnvironment.cs (1)
31public string ContentRootPath { get; set; } = string.Empty;
1 write to ContentRootPath
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironmentExtensions.cs (1)
74hostingEnvironment.ContentRootPath = contentRootPath;
41 references to ContentRootPath
Aspire.Hosting (1)
DistributedApplicationBuilder.cs (1)
220AppHostDirectory = options.ProjectDirectory ?? _innerBuilder.Environment.ContentRootPath;
Aspire.Hosting.Testing.Tests (2)
TestingBuilderTests.cs (1)
409Assert.Contains("TestingAppHost1", hostEnvironment.ContentRootPath);
TestingFactoryTests.cs (1)
66Assert.Contains("TestingAppHost1", appModel.ContentRootPath);
CatalogService (1)
CatalogApi.cs (1)
40var path = Path.Combine(environment.ContentRootPath, "Images", item.PictureFileName);
Microsoft.AspNetCore (6)
ConfigureHostBuilder.cs (1)
66var previousContentRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.ContentRootPath);
ConfigureWebHostBuilder.cs (2)
41var previousContentRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.ContentRootPath); 118var previousContentRoot = HostingPathResolver.ResolvePath(_context.HostingEnvironment.ContentRootPath);
WebHost.cs (3)
125/// set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/>, 144/// set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/>, 296/// set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/>,
Microsoft.AspNetCore.DataProtection (1)
Internal\HostingApplicationDiscriminator.cs (1)
34var contentRoot = _hosting?.ContentRootPath?.Trim();
Microsoft.AspNetCore.Hosting (6)
GenericHost\WebHostBuilderBase.cs (1)
87webHostBuilderContext.HostingEnvironment.Initialize(context.HostingEnvironment.ContentRootPath, options, baseEnvironment: context.HostingEnvironment);
Internal\HostingEnvironmentExtensions.cs (3)
75hostingEnvironment.ContentRootFileProvider = baseEnvironment?.ContentRootFileProvider ?? new PhysicalFileProvider(hostingEnvironment.ContentRootPath); 81var wwwroot = Path.Combine(hostingEnvironment.ContentRootPath, "wwwroot"); 89hostingEnvironment.WebRootPath = Path.Combine(hostingEnvironment.ContentRootPath, webRoot);
Internal\WebHostOptions.cs (1)
26ContentRootPath = environment?.ContentRootPath ?? GetConfig(WebHostDefaults.ContentRootKey);
WebHostExtensions.cs (1)
120Console.WriteLine($"Content root path: {hostingEnvironment?.ContentRootPath}");
Microsoft.AspNetCore.HttpLogging (2)
FileLoggerProcessor.cs (2)
53_path = Path.Join(environment.ContentRootPath, "logs"); 57_path = Path.Join(environment.ContentRootPath, _path);
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Internal\CertificatePathWatcher.cs (1)
32hostEnvironment.ContentRootPath,
Internal\Certificates\CertificateConfigLoader.cs (3)
40var certificatePath = Path.Combine(HostEnvironment.ContentRootPath, certInfo.Path!); 46var certificateKeyPath = Path.Combine(HostEnvironment.ContentRootPath, certInfo.KeyPath); 75return (new X509Certificate2(Path.Combine(HostEnvironment.ContentRootPath, certInfo.Path!), certInfo.Password), fullChain);
ListenOptionsHttpsExtensions.cs (3)
43return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName))); 57return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName), password)); 72return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName), password), configureOptions);
Microsoft.AspNetCore.StaticFiles (1)
StaticFileMiddleware.cs (1)
49_logger.WebRootPathNotFound(Path.GetFullPath(Path.Combine(hostingEnv.ContentRootPath, hostingEnv.WebRootPath ?? "wwwroot")));
Microsoft.Extensions.Hosting (10)
Host.cs (4)
21/// <item><description>set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/></description></item> 40/// <item><description>set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/></description></item> 65/// <item><description>set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/></description></item> 83/// <item><description>set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/></description></item>
HostApplicationBuilder.cs (3)
41/// <item><description>set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/></description></item> 64/// <item><description>set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/></description></item> 281string previousContentRootPath = _hostApplicationBuilder._hostBuilderContext.HostingEnvironment.ContentRootPath;
HostApplicationBuilderSettings.cs (1)
31/// * set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/>
HostingHostBuilderExtensions.cs (1)
181/// * set the <see cref="IHostEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/>
Internal\ConsoleLifetime.cs (1)
106Logger.LogInformation("Content root path: {ContentRoot}", Environment.ContentRootPath);
Microsoft.Extensions.Hosting.Abstractions (2)
HostDefaults.cs (1)
22/// The configuration key used to set <see cref="IHostEnvironment.ContentRootPath"/>
IHostEnvironment.cs (1)
32/// Gets or sets an <see cref="IFileProvider"/> pointing at <see cref="ContentRootPath"/>.
Microsoft.Extensions.Hosting.Systemd (1)
SystemdLifetime.cs (1)
98Environment.EnvironmentName, Environment.ContentRootPath);
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetime.cs (1)
83Environment.EnvironmentName, Environment.ContentRootPath);