Sparkdo.Hosting 2.0.0-preview.2

This is a prerelease version of Sparkdo.Hosting.
dotnet add package Sparkdo.Hosting --version 2.0.0-preview.2
                    
NuGet\Install-Package Sparkdo.Hosting -Version 2.0.0-preview.2
                    
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="Sparkdo.Hosting" Version="2.0.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.Hosting" Version="2.0.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.Hosting" />
                    
Project file
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 Sparkdo.Hosting --version 2.0.0-preview.2
                    
#r "nuget: Sparkdo.Hosting, 2.0.0-preview.2"
                    
#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 Sparkdo.Hosting@2.0.0-preview.2
                    
#: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=Sparkdo.Hosting&version=2.0.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.Hosting&version=2.0.0-preview.2&prerelease
                    
Install as a Cake Tool

Sparkdo.Hosting

职责

Sparkdo.HostingSparkdo.Runtime 与实际应用宿主之间的适配层。它组装 generated blueprint/delegates、DI service collection、options、lifecycle、property injection、resource、instrumentation、ASP.NET Core 和 Generic Host 边界。

不负责

本包不发现 manifest、不生成 blueprint、不读取 fragment、不扫描程序集,也不把 reflection discovery 作为缺失 generated evidence 的回退方案。

关键入口

  • SparkdoApplicationBuilder / SparkdoBuiltApplication:独立应用的 build、start、stop 与 run 生命周期。
  • SparkdoHost.Materialize(...):对显式 IBlueprintProvider 执行 Runtime materialization,并按选项生成 execution/interpreter trace。
  • SparkdoHostBuilderExtensions.AddSparkdoManifestRuntime(...):Generic Host 集成。
  • RuntimeAdapterHost 的 Hosting adapters:把 runtime action 映射到调用方提供的容器、实例、handler 和 generated delegate。

Application role 由 Sparkdo.CompilerSparkdo 命名空间生成 SparkdoApplication façade;Hosting 只提供它调用的 builder 与 adapter 实现。

依赖与集成

项目文件 引用 Sparkdo.BlueprintSparkdo.Runtime 和必要的 Microsoft.Extensions.* abstractions。典型生成式入口为:

using Sparkdo;

var builder = SparkdoApplication.CreateBuilder(args);
await using var app = await builder.BuildAsync();
await app.RunAsync();

验证

dotnet test src/polaris/test/Sparkdo.Hosting.Tests/Sparkdo.Hosting.Tests.csproj
Product 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.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Sparkdo.Hosting:

Package Downloads
Sparkdo.VirtualFileSystem

用于物化 Sparkdo 应用与包资产的虚拟文件系统运行时。

Sparkdo.Mediation

Sparkdo Mediation 的 generated dispatch runtime 与 application bootstrap 集成。

Sparkdo.Instrumentation

提供 Sparkdo activity、metric 和 recorder 的运行时 instrumentation 支持。

Sparkdo.Scheduler

Sparkdo Scheduler runtime package and embedded source generator asset.

Sparkdo.App

提供编译与宿主支持的 Sparkdo 应用编写元包。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.2 107 7/20/2026
2.0.0-preview.1 84 7/18/2026