GeWuYou.GFramework 0.0.216

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

GFramework

面向游戏开发场景的模块化 C# 框架,核心能力与具体引擎解耦,可按需组合 Core / Game / Godot / Source Generators。

NuGet Core NuGet Meta Godot .NET License zread

项目简介

GFramework 采用清晰分层与模块化设计,强调:

  • 架构分层(Architecture / Model / System / Utility)
  • 命令与查询分离(CQRS)
  • 类型安全事件机制
  • 可绑定属性与响应式数据流
  • 可扩展的 IOC/生命周期管理
  • 基于 Roslyn 的源码生成能力

项目灵感参考自 QFramework,并在模块边界、工程组织和可扩展性方面进行了持续重构。

功能模块

模块 说明 文档
GFramework.Core 平台无关的核心架构能力(架构、命令、查询、事件、属性、IOC、日志等) 查看
GFramework.Core.Abstractions Core 对应的抽象接口定义 查看
GFramework.Game 游戏业务侧扩展(状态、配置、存储、UI 等) 查看
GFramework.Game.Abstractions Game 模块抽象接口定义 查看
GFramework.Godot Godot 集成层(节点扩展、场景/设置/存储适配等) 查看
GFramework.SourceGenerators 通用源码生成器(日志、枚举扩展、规则等) 查看
GFramework.Godot.SourceGenerators Godot 场景下的源码生成器扩展 查看

文档导航

如果你更偏好按模块阅读,建议从各子项目 README.md 开始,再回到 docs/ 查阅专题文档。

包选择说明(避免混淆)

  • GeWuYou.GFramework:聚合元包(Meta Package),用于一键引入常用能力集合,适合快速试用或原型阶段。
  • GeWuYou.GFramework.Core:核心起步包,适合希望按模块精细控制依赖的项目(推荐生产项目从此起步)。

如果你已明确技术栈,建议优先按模块安装(Core / Game / Godot / SourceGenerators),避免不必要依赖。

快速安装

按实际需求选择依赖:

# 核心能力(推荐最小起步)
dotnet add package GeWuYou.GFramework.Core
dotnet add package GeWuYou.GFramework.Core.Abstractions

# 游戏扩展
dotnet add package GeWuYou.GFramework.Game
dotnet add package GeWuYou.GFramework.Game.Abstractions

# Godot 集成(仅 Godot 项目需要)
dotnet add package GeWuYou.GFramework.Godot

# 源码生成器(可选,但推荐)
dotnet add package GeWuYou.GFramework.SourceGenerators

可选模块导入

发布后的运行时包支持可选的模块级自动导入,但默认关闭,避免在普通项目里无意污染命名空间。

在 NuGet 消费项目中显式开启:

<PropertyGroup>
  <EnableGFrameworkGlobalUsings>true</EnableGFrameworkGlobalUsings>
</PropertyGroup>

启用后,项目已引用的 GFramework 运行时模块会通过 buildTransitive 自动注入其推荐命名空间。

如果某几个命名空间不想导入,可以局部排除:

<ItemGroup>
  <GFrameworkExcludedUsing Include="GFramework.Core.Environment" />
  <GFrameworkExcludedUsing Include="GFramework.Godot.Extensions" />
</ItemGroup>

该能力面向 NuGet 包消费场景。若你在本地解决方案中直接使用 ProjectReference,仍建议保留自己的 GlobalUsings.cs 或手写 using

仓库结构

GFramework.sln
├─ GFramework.Core/
├─ GFramework.Core.Abstractions/
├─ GFramework.Game/
├─ GFramework.Game.Abstractions/
├─ GFramework.Godot/
├─ GFramework.SourceGenerators/
├─ GFramework.Godot.SourceGenerators/
├─ docs/
└─ docfx/

兼容性

  • 运行时/工具链:基于 .NET 生态,具体以各项目 *.csprojTargetFramework 为准。
  • 引擎集成:当前提供 Godot 集成模块,Core 层可迁移至其他 .NET 场景。

贡献

欢迎提交 Issue 与 Pull Request:

  1. Fork 本仓库并创建特性分支
  2. 补充必要的测试或文档更新
  3. 提交 PR,描述变更背景、方案与验证结果

许可证

本项目采用 Apache License 2.0

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.216 72 4/7/2026
0.0.215 82 4/6/2026
0.0.214 84 4/5/2026
0.0.213 88 4/1/2026
0.0.212 86 3/31/2026
0.0.211 97 3/30/2026
0.0.210 147 3/28/2026
0.0.209 149 3/28/2026
0.0.208 200 3/24/2026
0.0.207 153 3/22/2026
0.0.206 115 3/21/2026
0.0.205 159 3/21/2026
0.0.204 228 3/14/2026
0.0.203 130 3/13/2026
0.0.202 103 3/8/2026
0.0.201 115 3/8/2026
0.0.200 126 3/5/2026
0.0.199 111 3/3/2026
0.0.198 222 3/2/2026
0.0.197 183 2/27/2026
Loading failed