Repository navigation
v0.6.0
feat
- Add unified result extension methods and static factories for 20 HTTP status codes (202, 405, 406, 410, 415, 422, 429, 500–504)
- Add generic
AsStatus()extension andUnifiedResult.Status<T>()static factory for customHttpStatusCode— covers any status code not explicitly enumerated - Add parameterless
ConfigureAuditTrail()overload — enables audit trail with default options without requiring a callback - Add
AuditTrailFormatenum withDefault,DotnetLogger,JsonStyle, andCompactpresets — configurable viaAuditTrailOptions.LogFormat - Add
SharkOption.ShowStartupBanner(defaulttrue) — allows disabling the startup banner
feat (Phase 5 — Lifecycle & startup integrity)
- #25 Startup banner: Sharkable now prints a formatted banner (version, environment, UTC timestamp) to the console at the end of
UseShark() - #20 Lifecycle hooks:
SharkOption.ConfigureOnStarted()/ConfigureOnStopped()— register callbacks that fire onIHostApplicationLifetime.ApplicationStarted/ApplicationStopping - #22 Readiness gate:
InternalShark.StartupCompletedopens after all wiring completes;/healthzreturns 503 until then - #23 Warmup:
IWarmupServiceinterface +SharkOption.ConfigureWarmup<T>()— resolves and runs a warmup task synchronously before the readiness gate opens (30s timeout) - #27 Eager singleton:
[SingletonService(Eager = true)]— eagerly resolves the singleton from DI duringUseShark(), before the server accepts requests - #26 Pipeline injection points:
UseSharkOptions.AddBeforeAuth()/AddAfterAuth()/AddAfterEndpoints()— inject custom middleware at specific pipeline positions - #21 Liveness probe:
/livezendpoint mapped alongside/healthz— returns{"status":"alive"}unconditionally, not blocked by readiness/shutdown gates - #24 DI validation:
SharkOption.ValidateOnStart<T>()— callsGetRequiredService<T>()duringUseShark(), fails fast on missing registrations
docs
- Document all unified result extension methods and static factories in EN + ZH
- Add service registration guide covering
[ScopedService],[TransientService],[SingletonService]attributes (EN + ZH) - Add lifecycle hooks, startup banner, warmup, eager singleton, pipeline injection, DI validation guide (EN + ZH)
- Update health checks guide with readiness gate and liveness probe details (EN + ZH)
Full Changelog: v0.5.7...v0.6.0