DovetailSettings Methods
ClassMethods2 members
Settings that change how Dovetail sets up a host, read from the host's own configuration (environment variables, command line, or anything added before Dovetail runs) rather than from Dovetail's configuration files.
GetConfiguredDirectory(IConfiguration?) Section titled GetConfiguredDirectory(IConfiguration?)staticnullablestring? The full path of
DovetailSettings.ConfigurationDirectory when configuration sets it, or else the Dovetail__ConfigurationDirectory environment variable does (for hosts whose configuration doesn't read environment variables); otherwise null. public static class DovetailSettings{ public static string? GetConfiguredDirectory( IConfiguration? configuration) { // ... }}Parameters
configurationIConfiguration? The host's configuration.Returns
string?The full path of the directory, or null. The directory of the entry point file of a file-based app (
dotnet run Build.cs ), where its configuration files sit, or null for any other app. public static class DovetailSettings{ public static string? GetEntryPointFileDirectory() { // ... }}Returns
string?The directory, or null.Remarks
The .NET SDK writes the directory into the runtimeconfig.json, so a published or copied file-based app still names the source directory of the machine it was built on; where that doesn't exist, this is
null.