Class SqlServerConnectionStorePathOptions
- Namespace
- ItTiger.TigerQuery.Core
- Assembly
- ItTiger.TigerQuery.Core.dll
The inputs SqlServerConnectionStorePathResolver chooses a
connection-store file path from: an optional caller override, the TigerQuery
environment variable, and the host application's default location.
public sealed class SqlServerConnectionStorePathOptions
- Inheritance
-
SqlServerConnectionStorePathOptions
- Inherited Members
Remarks
The same options serve a command-line application, a test library, a service, and a
container. Only the source of ExplicitFilePath differs — a CLI host fills
it from a global option, a library caller passes it directly.
Properties
DefaultFilePath
Gets the host application's default store location. Required.
public required string DefaultFilePath { get; init; }
Property Value
Remarks
TigerQuery has no universal default, so the host must name one — typically from
Shared(string, string) or
AppSpecific(string, string, string). It is validated like
any other source, so a blank or malformed default fails resolution rather than
producing an unusable path.
EnvironmentReader
Gets the environment lookup, or null to read the process environment.
public Func<string, string?>? EnvironmentReader { get; init; }
Property Value
Remarks
The lookup takes a variable name and returns its value, or null when the variable
is not set. Injecting it lets a test cover environment precedence without mutating
process-global state, which is unsafe alongside parallel tests. The default is
GetEnvironmentVariable(string).
EnvironmentVariableName
Gets the environment variable consulted between the override and the default.
public string EnvironmentVariableName { get; init; }
Property Value
Remarks
Defaults to ConnectionStoreFile.
Overriding it is intended for tests and for a host that must coexist with an
established variable of its own; changing it changes a documented contract.
ExplicitFilePath
Gets the caller-supplied override, or null when none was supplied.
public string? ExplicitFilePath { get; init; }
Property Value
Remarks
Null means "not supplied" and lets the environment variable and application
default apply. An empty or whitespace value means "supplied but unusable" and
fails resolution; the two are deliberately not the same.