Sylin.Koan.Recipe.Abstractions
0.17.0
dotnet add package Sylin.Koan.Recipe.Abstractions --version 0.17.0
NuGet\Install-Package Sylin.Koan.Recipe.Abstractions -Version 0.17.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sylin.Koan.Recipe.Abstractions" Version="0.17.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Recipe.Abstractions" Version="0.17.0" />
<PackageReference Include="Sylin.Koan.Recipe.Abstractions" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sylin.Koan.Recipe.Abstractions --version 0.17.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sylin.Koan.Recipe.Abstractions, 0.17.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sylin.Koan.Recipe.Abstractions@0.17.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sylin.Koan.Recipe.Abstractions&version=0.17.0
#tool nuget:?package=Sylin.Koan.Recipe.Abstractions&version=0.17.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Koan.Recipe.Abstractions
Contract
- Purpose: Define recipe contracts for bundling Koan modules into intention-driven runtime profiles (observability, auth, storage, etc.).
- Primary inputs: Classes marked with
[KoanRecipe], recipe capability descriptors, and DI registration helpers. - Outputs: Registered recipes accessible via
IKoanRecipeRegistry, capability metadata for discovery, and staged initialization gates. - Failure modes: Recipe mis-declared (missing attribute), unmet capability gates, or initializer exceptions during bootstrap.
- Success criteria: Recipes register cleanly, advertise capabilities, and initialize their services in the expected order.
Quick start
[KoanRecipe("observability:otel", DisplayName = "Observability baseline")]
public sealed class ObservabilityRecipe : IKoanRecipe
{
public void Describe(RecipeCapabilities caps)
=> caps.Provides("otel:tracing").Requires("storage:default");
public void ConfigureServices(IKoanRecipeContext context)
{
context.Services.AddOpenTelemetry();
context.Log("Registered observability pipeline");
}
}
public sealed class RecipeAutoRegistrar : IKoanAutoRegistrar
{
public string ModuleName => "Recipes";
public void Initialize(IServiceCollection services)
=> services.AddKoanRecipe<ObservabilityRecipe>();
public void Describe(BootReport report, IConfiguration cfg, IHostEnvironment env)
=> report.AddNote("Observability recipe available");
}
- Use the
[KoanRecipe]attribute to name and classify recipes. - Implement
IKoanRecipeto declare capabilities and register services in a controlled order.
Configuration
- Guard recipes with
RecipeGatesto require environment checks or secrets before running. - Inject configuration via
KoanRecipeOptionsto allow per-environment tuning. - Use
RecipeApplierto activate recipes programmatically (e.g., CLI).
Edge cases
- Conflicting recipes: ensure capability requirements don’t create circular dependencies; use
Requires()andProvides()consistently. - Partial activation: handle
RecipeInitializerfailures by logging and short-circuiting subsequent stages. - Multi-tenant setups: register tenant-specific recipes under unique IDs to avoid collisions.
- Hot reload: recipes run during bootstrap; for dynamic changes use Koan orchestration instead.
Related packages
Koan.Recipe.Observability– concrete recipe implementation building on these abstractions.Koan.Core– DI primitives and boot logging used by recipes.Koan.Orchestration.Abstractions– can activate recipes as part of environment provisioning.
Reference
IKoanRecipe– core interface for recipe implementations.RecipeCapabilities– DSL for declaring requirements and features.RecipeRegistry– lookup surface for activated recipes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Sylin.Koan.Core (>= 0.17.0 && < 0.18.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sylin.Koan.Recipe.Abstractions:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Recipe.Observability
Observability baseline recipe (health checks + OTEL + resilient HttpClient). |
GitHub repositories
This package is not used by any popular GitHub repositories.
See release notes: https://github.com/sylin-labs/Koan-framework/releases