Class BowireProjectLoader
- Namespace
- Kuestenlogik.Bowire.Projects
- Assembly
- Kuestenlogik.Bowire.dll
Auto-discovery + loading for the .bowire/project.json convention
(#172). Discover(string?) walks UP the directory tree from a start
directory (default: the current working directory) looking for
.bowire/project.json — the same "find the nearest config walking
toward the repo root" shape git, npm, and dotnet use — so a command run
anywhere inside a checkout picks up the project without a flag. It never
throws on "not found": it returns null, and the caller
decides whether that's an error. Load(string) reads a specific file
and hands the text to Parse(string?) (which throws on
malformed / shape-invalid content).
public static class BowireProjectLoader
- Inheritance
-
BowireProjectLoader
- Inherited Members
Fields
ConventionDirName
The convention directory that holds the manifest.
public const string ConventionDirName = ".bowire"
Field Value
ConventionFileName
The convention manifest filename inside ConventionDirName.
public const string ConventionFileName = "project.json"
Field Value
Methods
Discover(string?)
Walk up from startDirectory (default: the current
working directory) looking for .bowire/project.json. Returns the
first match toward the filesystem root, or null when
none exists anywhere up the chain. Never throws for "not found" — an
unreadable / malformed start path also yields null.
public static BowireProjectLocation? Discover(string? startDirectory = null)
Parameters
startDirectorystring
Returns
Load(string)
Read and parse the manifest at filePath. Propagates
JsonException / ArgumentException
from Parse(string?), and lets an IO failure
surface as its native exception (a caller that passed an explicit path
wants to know the file couldn't be read).
public static BowireProjectFile Load(string filePath)
Parameters
filePathstring