TKWF.CodeGeneration.Abstractions 4.10.94

There is a newer version of this package available.
See the version list below for details.
dotnet add package TKWF.CodeGeneration.Abstractions --version 4.10.94
                    
NuGet\Install-Package TKWF.CodeGeneration.Abstractions -Version 4.10.94
                    
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="TKWF.CodeGeneration.Abstractions" Version="4.10.94" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TKWF.CodeGeneration.Abstractions" Version="4.10.94" />
                    
Directory.Packages.props
<PackageReference Include="TKWF.CodeGeneration.Abstractions" />
                    
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 TKWF.CodeGeneration.Abstractions --version 4.10.94
                    
#r "nuget: TKWF.CodeGeneration.Abstractions, 4.10.94"
                    
#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 TKWF.CodeGeneration.Abstractions@4.10.94
                    
#: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=TKWF.CodeGeneration.Abstractions&version=4.10.94
                    
Install as a Cake Addin
#tool nuget:?package=TKWF.CodeGeneration.Abstractions&version=4.10.94
                    
Install as a Cake Tool

TKWF.Framework — 龙爸出品

领域级 .NET 支撑框架,提供统一的领域驱动基础设施、代码生成器、跨平台客户端支持。

当前版本:4.10.89(目标框架:.NET 10 / .NET Standard 2.0 / 2.1)


架构图

仓库架构图总览(archify 生成,自包含 HTML,可直接双击打开):.archify/index.html

ID 图 ID 图
A1 整体架构分层 C1 编译期代码生成流水线
B1 双仓关系 C2 Outbox/Inbox 事件流
B2 分层依赖规则 C3 扩展模块接入流程
B3 NuGet 包发布 C4 门控与诊断码体系
— — C5 会话与 AOP 调用链

扩展仓(_TKWF.Extensions)自己的架构图在其仓库 .archify/index.html,由扩展侧维护。


目录结构

_Framework/                  核心框架(13 个项目)
├── Abstractions/            纯抽象层(接口、枚举、属性、POCO,netstandard2.0)
├── Core/                    内核(AOP 内核、异常/会话/后台作业接口、事件总线抽象,netstandard2.1)
├── Domain/                  领域驱动设计(实体/服务/会话/初始化器/事务/多租户/SystemActor/密钥管理)
├── Utility/                 工具库(Analytics 计算内核、OAuthClient 协议引擎、Cryptography、Tags、IdGenerator)
├── Utility/DataPort/        数据搬运核心(导入/导出/批次)
├── Utility.DataPort.Providers.MiniExcel/  Excel Provider
├── Localization/            本地化实现(netstandard2.0)
├── Localization/TKWF.Framework.Localization.Gen/  resx → i18n JSON / keys.ts 构建期发射器
├── BackgroundJobs/          后台作业默认实现(DefaultBackgroundJobManager + JobRecord)
├── BackgroundJobs.Hangfire/ 后台作业 Hangfire Provider(可选对接,LGPLv3)
├── BackgroundJobs.Quartz/   后台作业 Quartz Provider(可选对接)
├── EventBus.RabbitMQ/       分布式事件总线传输(RabbitMQ)
└── Outbox/                  事务性 Outbox/Inbox worker

_Domain.Api/                 API 客户端
├── ApiClient/               HTTP 客户端基座(GraphQL 已合并入此)
└── ApiClient.Rest/          RESTful 客户端实现

_Domain.ApiService/          服务端 API 实现
├── Hosting/                 宿主集成(UseApiService)
├── MinimalApi/              Minimal API 集成
└── HotChocolate/            GraphQL (HotChocolate) 集成

_Domain.SG/                  源代码生成器(三层)
├── CodeGeneration/          SG1a 元数据 + SG1b 控制器/装饰器
├── ApiService.SG/           SG2 服务端 Resolver/REST + ApiMetadata
├── ApiClient.SG/            SG3 客户端代理
├── CodeGeneration.Abstractions/  元数据 / 门控 / Guard / 命名约定(netstandard2.0)
└── Shared/                  链接编译的 Roslyn 助手源码

_Domain.Infrastructure/      基础设施实现
├── Web/                     ASP.NET Core 中间件/过滤器/Web 扩展钩子/OAuth 资源服务器/页面装配
├── Blazor.Abstractions/     Blazor 抽象
├── Blazor.Server/           Blazor Server 组件
├── Blazor.Wasm/             Blazor WebAssembly 组件
├── FreeSql/                 FreeSql ORM 集成
├── EFCore/                  EF Core 适配
└── Maui/                    .NET MAUI 支持

_Domain.Testing/             测试工具
├── xUnit/                   DomainXunitTestBase + 容器守卫(PG/RabbitMQ)
└── Mock/                    MockDbEntityDAC + Bogus 数据生成

_xCodeGen/                   CLI 代码生成工具
├── xCodeGen.Core/           生成引擎(RazorLight)
└── xCodeGen.Cli/            命令行入口 + Templates/ + scaffolding/ + init/ + scripts/

_Tests/                      测试项目(22 个,见 PROJECT_STRUCTURE.md)

docs/                        框架文档(含 04-架构笔记/ 架构理解、03_扩展模块/ 扩展跟踪、02-迭代开发/ ADR)

完整项目结构、扩展模块总览与迁出历史见 PROJECT_STRUCTURE.md。扩展模块(TKWF.Ext.*)在独立仓库 LoongBa/_TKWF.Extensions。

快速开始


<PackageReference Include="TKWF.Domain" />

已知注意事项

  • TKWF.BackgroundJobs.Hangfire(V4.9.104):Hangfire.Core 1.8.18 传递依赖 Newtonsoft.Json。已通过 CPM 钉选 Newtonsoft.Json 13.0.4 缓解已知高危漏洞(NU1903 警告已消除)。Provider 为可选对接(默认进程内实现无此依赖)。

构建要求

  • .NET SDK 10.0+
  • Visual Studio 2022+ / Rider
dotnet restore TKW.Framework.slnx
dotnet build TKW.Framework.slnx -c Release

xCodeGen 工具

代码生成与解决方案脚手架工具(new-solution/add-project/gen),dotnet tool 安装:

dotnet tool install -g TKWF.XCodeGen
xcodegen --help

免费使用(商业许可,禁止再分发——详见 LICENSE)。消费项目生成脚手架/代码经 xcodegen init / xcodegen new-solution 引导。

许可证

分层商业授权模型——Copyright © 2026 LoongBa.cn(洛博网络科技)· 保留所有权利。

层 内容 授权
开源层 扩展模块(TKWF.Ext.*)/ Demo / Samples 完全开源(独立公开仓库)
免费层 框架 NuGet 二进制 + xCodeGen 基础能力 免费使用(商业许可,禁止再分发)
团队版 xCodeGen 授权解锁(次数/高级功能) License Key · 国际 $1,999(活动 $1,799,3 人)· 国内 ¥2,999(3 人)/ 单人 ¥1,500
企业版 主框架源码授权 + 优先支持 国际 $2,999+$1,000 · 国内更贵(发票/税/服务)
旗舰版 企业版全部 + 无限支持 国际 $4,999+$2,000 · 国内更贵

框架 NuGet 包完全免费提供(暂不开源),不阻碍使用与评估;xCodeGen 凭授权解锁能力,免费档能力受限。定价为初期试点(双轨:国际美元对齐 ABP 定价逻辑 + 偏移;国内人民币更便宜),续订 8 折与 ABP 一致(团队版 = $1,799 与活动价一致;企业/旗舰 = 基础费用 8 折 + 偏移),推出后可能调整。加扰防破解仅作鼓励手段,引导正规团队/企业购买"安全、放心、服务"。详见 LICENSE 与 ADR77-商业授权与xCodeGen授权控制模型。

商业授权请联系 LoongBa.cn。

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (42)

Showing the top 5 NuGet packages that depend on TKWF.CodeGeneration.Abstractions:

Package Downloads
TKWF.Core

TKWF 框架核心类型层 — 纯接口、枚举、POCO,零运行时依赖

TKWF.Domain

TKWF 核心领域框架 — Controllers, Services, 认证, 权限, 租户等

TKWF.Domain.Api

TKWF API 客户端核心 — DomainClient, ClientAppBuilder, 查询构建器

TKWF.Domain.FreeSql

TKWF FreeSql ORM 集成

TKWF.Domain.EFCore

TKWF EF Core ORM 集成(V4.9.54 ADR27:多 ORM 兼容适配层)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.10.97 44 10/28/2026
4.10.96 53 10/28/2026
4.10.95 55 10/28/2026
4.10.94 76 10/28/2026
4.10.93 77 10/28/2026
4.10.92 85 10/27/2026
4.10.91 93 10/27/2026
4.10.90 97 10/27/2026
4.10.89 96 10/27/2026
4.10.88 100 10/27/2026
4.10.87 371 10/27/2026
4.10.86 148 10/27/2026
4.10.85 868 10/24/2026
4.10.84 682 10/24/2026
4.10.83 228 10/24/2026
4.10.82 237 10/24/2026
4.10.81 303 10/18/2026
4.10.80 2,599 10/17/2026
4.10.79 302 10/17/2026
4.10.78 297 10/17/2026
Loading failed