Sparkdo.TextTemplating.Abstractions
3.0.0-preview.1
dotnet add package Sparkdo.TextTemplating.Abstractions --version 3.0.0-preview.1
NuGet\Install-Package Sparkdo.TextTemplating.Abstractions -Version 3.0.0-preview.1
<PackageReference Include="Sparkdo.TextTemplating.Abstractions" Version="3.0.0-preview.1" />
<PackageVersion Include="Sparkdo.TextTemplating.Abstractions" Version="3.0.0-preview.1" />
<PackageReference Include="Sparkdo.TextTemplating.Abstractions" />
paket add Sparkdo.TextTemplating.Abstractions --version 3.0.0-preview.1
#r "nuget: Sparkdo.TextTemplating.Abstractions, 3.0.0-preview.1"
#:package Sparkdo.TextTemplating.Abstractions@3.0.0-preview.1
#addin nuget:?package=Sparkdo.TextTemplating.Abstractions&version=3.0.0-preview.1&prerelease
#tool nuget:?package=Sparkdo.TextTemplating.Abstractions&version=3.0.0-preview.1&prerelease
Sparkdo.TextTemplating.Abstractions
Sparkdo.TextTemplating.Abstractions 定义文本模板能力的稳定公共契约:模板定义(TemplateDefinition)、定义上下文与提供者(ITemplateDefinitionContext / ITemplateDefinitionProvider)、内容责任链(ITemplateContentContributor / ITemplateContentProvider)、渲染入口(ITemplateRenderer / TemplateRenderContext)与渲染引擎(ITemplateRenderingEngine / TemplateRenderingContext)。
只需要声明模板、编写模板内容来源或实现渲染引擎 adapter 时引用本包;需要默认定义管理、内联内容、纯文本引擎和 DI 接线时引用 Sparkdo.TextTemplating。
设计要点:
- 零 NuGet 依赖(
net10.0与net11.0两个依赖组实测皆空;Microsoft.Extensions.*抽象在 net11.0 平台内置、在 net10.0 由契约包自身不需要),AOT 与裁剪分析器全开,全程无反射。 TemplateContentContributorContext/TemplateRenderContext/TemplateRenderingContext均为只读值类型:内容责任链与渲染链全程栈上构造,零堆分配。- 贡献者「后注册优先」、定义「后声明者覆盖」、引擎「按
Name显式选择」——三处扩展点都不依赖程序集扫描。 - 契约只有
ValueTask异步形态;同步完成的查询不产生任何状态机分配。
| 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. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Sparkdo.TextTemplating.Abstractions:
| Package | Downloads |
|---|---|
|
Sparkdo.Emailing
Sparkdo 邮件发送库,提供基于 SMTP 的邮件发送功能,支持同步/异步发送、后台队列发送和模板邮件 |
|
|
Sparkdo.TextTemplating.Scriban
Sparkdo 框架的文本模板 Scriban 引擎实现。基于 Scriban 库提供强大的模板渲染功能,支持本地化、模型绑定和复杂模板逻辑。 |
|
|
Sparkdo.TextTemplating.Razor
Sparkdo 框架的文本模板 Razor 引擎实现。提供基于 Razor 语法的文本模板渲染功能。 |
|
|
Sparkdo.TextTemplating
Sparkdo 文本模板默认运行时:冻结字典模板目录、内容贡献者责任链、区域性回退、带布局支持的纯文本引擎与 AddSparkdoTextTemplating 一行接线。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-preview.1 | 72 | 10/30/2026 |
| 2.0.0-preview.2 | 110 | 7/20/2026 |
| 1.0.4-preview.3 | 121 | 6/8/2026 |
| 1.0.4-preview.2 | 104 | 6/7/2026 |
| 1.0.4-preview.1 | 121 | 6/7/2026 |
| 1.0.3 | 240 | 6/6/2026 |
| 1.0.3-preview.1 | 109 | 5/17/2026 |
| 1.0.2 | 196 | 4/27/2026 |
| 1.0.2-preview.5 | 102 | 4/15/2026 |
| 1.0.2-preview.4 | 120 | 2/8/2026 |
| 1.0.2-preview.3 | 120 | 2/1/2026 |
| 1.0.2-preview.2 | 109 | 1/31/2026 |
| 1.0.2-preview.1 | 222 | 12/4/2025 |
| 1.0.1 | 416 | 11/27/2025 |
| 1.0.0 | 427 | 11/25/2025 |
| 1.0.0-preview.5 | 176 | 10/24/2025 |