Table of Contents

Class SqlServerConnectionStorePathResolver

Namespace
ItTiger.TigerQuery.Core
Assembly
ItTiger.TigerQuery.Core.dll
Chooses the connection-store file path for a run: an explicit override, then the TigerQuery environment variable, then the host application's default location.
public static class SqlServerConnectionStorePathResolver
Inheritance
SqlServerConnectionStorePathResolver
Inherited Members

Remarks

This is the one place the precedence is defined. Command-line tools, test libraries, services, and containers all get the same answer, so a store selected by a tool and a store selected by library code in the same workflow are the same file.

Resolution is inert. It reads the environment, normalizes a string, and returns — it creates nothing, opens nothing, and asks the file system nothing, so calling it is safe long before a caller knows whether a store will be used. Deciding what an absent file means, and constructing the SqlServerConnectionStore, are separate steps the caller owns.

Methods

Resolve(SqlServerConnectionStorePathOptions)

Resolves the store file path from the configured sources.
public static SqlServerConnectionStorePathResolution Resolve(SqlServerConnectionStorePathOptions options)

Parameters

options SqlServerConnectionStorePathOptions
The override, environment, and application-default inputs.

Returns

SqlServerConnectionStorePathResolution
A success carrying the normalized absolute path and the source that selected it, or a failure naming the source whose value could not be used.

Remarks

A source that supplies no value at all is skipped. A source that supplies a value decides the outcome: if that value is unusable the result is a failure, never a fallback to a lower-priority source. Only syntactic validation is applied — blank values, values that cannot be normalized to an absolute path, and values with no file-name component.

Exceptions

ArgumentNullException
options is null.
ArgumentException
EnvironmentVariableName is null, empty, or whitespace. That is a host configuration mistake rather than a user error, so it throws instead of producing a failed resolution.