Class SqlServerConnectionStorePathResolution
- Namespace
- ItTiger.TigerQuery.Core
- Assembly
- ItTiger.TigerQuery.Core.dll
Outcome of choosing a connection-store file path. Either carries a normalized absolute
FilePath and the Source that selected it, or an
Error and ErrorMessage describing why the highest-priority
source that supplied a value could not be used.
public sealed class SqlServerConnectionStorePathResolution
- Inheritance
-
SqlServerConnectionStorePathResolution
- Inherited Members
Remarks
A failure never carries a path. The resolver does not fall back to a lower-priority
source once a higher-priority one has spoken, so a misconfigured build agent fails
visibly instead of quietly using a developer's personal store.
Properties
AttemptedValue
The rejected value, as supplied. Non-null only on failure, and null when the value was null.
public string? AttemptedValue { get; }
Property Value
Remarks
A store path is not a secret, so it is safe to echo back to the user; showing it
is usually the fastest way to reveal a mistyped option or a badly quoted
container variable.
Error
Why resolution failed. None on success.
public SqlServerConnectionStorePathError Error { get; }
Property Value
ErrorMessage
A clean, user-facing failure reason in English. Non-null only when IsSuccess is false.
public string? ErrorMessage { get; }
Property Value
Remarks
Core carries no resources. A localizing host should compose its own message from
Error, Source, and AttemptedValue and use
this only as the neutral fallback.
FilePath
The normalized absolute store path. Non-null only when IsSuccess is true.
public string? FilePath { get; }
Property Value
Remarks
Suitable for FilePath. Nothing has
been read, created, or checked at this location; that happens when a store is
constructed and used.
IsSuccess
Gets whether a usable store file path was selected.
public bool IsSuccess { get; }
Property Value
Source
The source that selected the path, or that supplied the unusable value.
public SqlServerConnectionStorePathSource Source { get; }
Property Value
Methods
Failure(SqlServerConnectionStorePathSource, SqlServerConnectionStorePathError, string?, string)
Creates a failed resolution.
public static SqlServerConnectionStorePathResolution Failure(SqlServerConnectionStorePathSource source, SqlServerConnectionStorePathError error, string? attemptedValue, string errorMessage)
Parameters
sourceSqlServerConnectionStorePathSource- The source that supplied the unusable value.
errorSqlServerConnectionStorePathError- The reason the value was rejected.
attemptedValuestring- The rejected value, or null when the value was null.
errorMessagestring- The nonblank English failure reason.
Returns
- SqlServerConnectionStorePathResolution
- A failure carrying no path.
Exceptions
- ArgumentException
erroris None, orerrorMessageis null, empty, or whitespace.
Success(string, SqlServerConnectionStorePathSource)
Creates a successful resolution.
public static SqlServerConnectionStorePathResolution Success(string filePath, SqlServerConnectionStorePathSource source)
Parameters
filePathstring- The nonblank normalized absolute path.
sourceSqlServerConnectionStorePathSource- The source that selected
filePath.
Returns
- SqlServerConnectionStorePathResolution
- A success carrying
filePathandsource.
Exceptions
- ArgumentException
filePathis null, empty, or whitespace. The parameter name isfilePath.