TKWF.Domain.Testing.Mock 4.10.121

dotnet add package TKWF.Domain.Testing.Mock --version 4.10.121
                    
NuGet\Install-Package TKWF.Domain.Testing.Mock -Version 4.10.121
                    
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.Domain.Testing.Mock" Version="4.10.121" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TKWF.Domain.Testing.Mock" Version="4.10.121" />
                    
Directory.Packages.props
<PackageReference Include="TKWF.Domain.Testing.Mock" />
                    
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.Domain.Testing.Mock --version 4.10.121
                    
#r "nuget: TKWF.Domain.Testing.Mock, 4.10.121"
                    
#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.Domain.Testing.Mock@4.10.121
                    
#: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.Domain.Testing.Mock&version=4.10.121
                    
Install as a Cake Addin
#tool nuget:?package=TKWF.Domain.Testing.Mock&version=4.10.121
                    
Install as a Cake Tool

TKWF.Framework — 龙爸出品

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

当前版本:4.10.113(目标框架:.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 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 (1)

Showing the top 1 NuGet packages that depend on TKWF.Domain.Testing.Mock:

Package Downloads
TKWF.Domain.Testing.xUnit

TKWF xUnit 测试辅助工具:容器 A 级测试基建——DockerDaemonGuard(Docker daemon 探测,v4.10.72 泛化自 PgContainerGuard)+ PgContainerRequired/PgContainerTestFixture(PG 物理事务,V5 Iter-5 ADR100)+ RabbitMqRequired/RabbitMqContainerFixture(RabbitMQ 传输测试,v4.10.72)——发现期 Skip(本地无 Docker)/CI 强制;EnsureAvailable 本地 Skip/CI Fail。消费方扩展/测试项目引用本包获取容器测试两会话(PG/RabbitMQ)。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.10.121 106 11/16/2026
4.10.116 112 11/7/2026
4.10.105 114 11/5/2026
4.10.104 100 11/5/2026
4.10.103 103 11/5/2026
4.10.100 119 10/31/2026
4.10.99 117 10/30/2026
4.10.97 121 10/28/2026
4.10.96 118 10/28/2026
4.10.95 113 10/28/2026
4.10.94 116 10/28/2026
4.10.93 114 10/28/2026
4.10.92 104 10/27/2026
4.10.91 117 10/27/2026
4.10.90 110 10/27/2026
4.10.89 114 10/27/2026
4.10.88 117 10/27/2026
4.10.87 118 10/27/2026
4.10.86 107 10/27/2026
4.10.85 112 10/24/2026
Loading failed