Meta

Helper Catalog

Canonical helper types and guidelines for re-use.

Logging & Levels

  • Xtraq.Utils.LogLevelConfiguration - single source for XTRAQ_LOG_LEVEL parsing and promotion. Use IsAtLeast(...) for gating output; avoid bespoke env flags.
  • Xtraq.Utils.DebugOutputHelper - conditional console writes that respect log level. Prefer WriteVerboseDebug/WriteDebug instead of raw Console.WriteLine.

Environment & Paths

  • Xtraq.Utils.EnvironmentHelper - boolean env evaluation (IsTrue, EqualsTrue). Avoid re-implementing flag parsing.
  • Xtraq.Utils.ProjectRootResolver - standard project root discovery (env, .xtraqconfig, CWD). Use for any cache/persist paths.
  • Xtraq.Utils.DirectoryUtils - base-path overrides for tests/CLI -p; reset via DirectoryUtils.ResetBasePath() in fixtures.

Console Output

  • Xtraq.Services.ConsoleService - unified Spectre/non-Spectre surface (Info/Verbose/Warn/Error, BeginProgressScope, warning summary). Do not emit raw Spectre calls outside this abstraction.

Cache & Invalidation

  • Xtraq.Cache.SchemaObjectCacheManager - persists schema object modify dates + dependency graph. Use via ISchemaObjectCacheManager in planner/analyzer code; avoid ad-hoc file IO for cache state.
  • Reuse the helpers above before introducing new small utilities.
  • New flags: prefer XTRAQ_LOG_LEVEL or CLI options over bespoke env switches.
  • When adding console output, route through ConsoleService and gate with LogLevelConfiguration.