mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(core): 重构框架命名空间为GFramework.Core
- 将所有framework命名空间下的类迁移至GFramework.Core命名空间 - 更新所有相关using引用从framework到Core - 重命名项目文件夹及文件路径以匹配新的命名空间结构 - 在解决方案中添加GFramework.Core项目引用 - 配置项目依赖关系并移除旧的Generator引用冲突 - 创建独立的GFramework.Core.csproj项目文件支持多目标框架
This commit is contained in:
parent
50a71deaa7
commit
e204f899ba
10
GFramework.Core/GFramework.Core.csproj
Normal file
10
GFramework.Core/GFramework.Core.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>GeWuYou.GFramework.Core</PackageId>
|
||||
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,12 +1,12 @@
|
||||
using GFramework.framework.command;
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.ioc;
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.query;
|
||||
using GFramework.framework.system;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.command;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.ioc;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.query;
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.architecture;
|
||||
namespace GFramework.Core.architecture;
|
||||
|
||||
/// <summary>
|
||||
/// 架构基类,提供系统、模型、工具等组件的注册与管理功能。
|
||||
@ -1,11 +1,11 @@
|
||||
using GFramework.framework.command;
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.query;
|
||||
using GFramework.framework.system;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.command;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.query;
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.architecture;
|
||||
namespace GFramework.Core.architecture;
|
||||
|
||||
/// <summary>
|
||||
/// 架构接口,定义了应用程序架构的核心功能,包括系统、模型、工具的注册和获取,
|
||||
@ -1,7 +1,7 @@
|
||||
using GFramework.framework.architecture;
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.architecture;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.command;
|
||||
namespace GFramework.Core.command;
|
||||
|
||||
/// <summary>
|
||||
/// 抽象命令类,实现 ICommand 接口,为具体命令提供基础架构支持
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.command;
|
||||
namespace GFramework.Core.command;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个可以发送命令的接口,继承自IBelongToArchitecture接口。
|
||||
@ -1,11 +1,11 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.query;
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.framework.system;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.query;
|
||||
using GFramework.Core.rule;
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.command;
|
||||
namespace GFramework.Core.command;
|
||||
|
||||
/// <summary>
|
||||
/// 命令接口,定义了无返回值命令的基本契约
|
||||
@ -1,11 +1,11 @@
|
||||
using GFramework.framework.command;
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.query;
|
||||
using GFramework.framework.system;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.command;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.query;
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.controller;
|
||||
namespace GFramework.Core.controller;
|
||||
|
||||
/// <summary>
|
||||
/// 控制器接口,定义了控制器需要实现的所有功能契约
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 简单事件类,用于注册、注销和触发无参事件回调
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 泛型事件类,支持一个泛型参数 T 的事件注册、注销与触发。
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// EasyEvents事件管理器类,用于全局事件的注册、获取和管理
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个可以注册事件的接口,继承自IBelongToArchitecture接口。
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个可以发送事件的接口,继承自IBelongToArchitecture接口。
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 事件接口,定义了事件注册的基本功能
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 提供注销功能的接口
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// 提供统一注销功能的接口,用于管理需要注销的对象列表
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.extensions;
|
||||
using GFramework.Core.extensions;
|
||||
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// OrEvent类用于实现事件的或逻辑组合,当任意一个注册的事件触发时,都会触发OrEvent本身
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
/// <summary>
|
||||
/// TypeEventSystem
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.events;
|
||||
namespace GFramework.Core.events;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,8 +1,8 @@
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.system;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.extensions;
|
||||
namespace GFramework.Core.extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供获取模型对象扩展方法的静态类
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.Core.events;
|
||||
|
||||
namespace GFramework.framework.extensions;
|
||||
namespace GFramework.Core.extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 事件注册扩展类,提供ICanRegisterEvent接口的扩展方法用于注册和注销事件
|
||||
@ -1,8 +1,8 @@
|
||||
using GFramework.framework.command;
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.query;
|
||||
using GFramework.Core.command;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.query;
|
||||
|
||||
namespace GFramework.framework.extensions;
|
||||
namespace GFramework.Core.extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供发送命令功能的扩展类
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.Core.events;
|
||||
|
||||
namespace GFramework.framework.extensions;
|
||||
namespace GFramework.Core.extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供Or事件扩展方法的静态类
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.Core.events;
|
||||
|
||||
namespace GFramework.framework.extensions;
|
||||
namespace GFramework.Core.extensions;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.ioc;
|
||||
namespace GFramework.Core.ioc;
|
||||
|
||||
/// <summary>
|
||||
/// IOC容器类,用于管理对象的注册和获取
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.architecture;
|
||||
using GFramework.Core.architecture;
|
||||
|
||||
namespace GFramework.framework.model;
|
||||
namespace GFramework.Core.model;
|
||||
|
||||
/// <summary>
|
||||
/// 抽象模型基类,实现IModel接口,提供模型的基本架构支持
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.model;
|
||||
namespace GFramework.Core.model;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个接口,表示可以获取模型的架构组件。
|
||||
@ -1,8 +1,8 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.rule;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.model;
|
||||
namespace GFramework.Core.model;
|
||||
|
||||
/// <summary>
|
||||
/// 模型接口,定义了模型的基本行为和功能
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.Core.events;
|
||||
|
||||
namespace GFramework.framework.property;
|
||||
namespace GFramework.Core.property;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.Core.events;
|
||||
|
||||
namespace GFramework.framework.property;
|
||||
namespace GFramework.Core.property;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.property;
|
||||
namespace GFramework.Core.property;
|
||||
|
||||
/// <summary>
|
||||
/// 可绑定属性接口,继承自只读可绑定属性接口,提供可读写的属性绑定功能
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.Core.events;
|
||||
|
||||
namespace GFramework.framework.property;
|
||||
namespace GFramework.Core.property;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.architecture;
|
||||
using GFramework.Core.architecture;
|
||||
|
||||
namespace GFramework.framework.query;
|
||||
namespace GFramework.Core.query;
|
||||
|
||||
/// <summary>
|
||||
/// 抽象查询类,提供查询操作的基础实现
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.query;
|
||||
namespace GFramework.Core.query;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个可以发送查询的接口契约
|
||||
@ -1,8 +1,8 @@
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.framework.system;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.rule;
|
||||
using GFramework.Core.system;
|
||||
|
||||
namespace GFramework.framework.query;
|
||||
namespace GFramework.Core.query;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.architecture;
|
||||
using GFramework.Core.architecture;
|
||||
|
||||
namespace GFramework.framework.rule;
|
||||
namespace GFramework.Core.rule;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.architecture;
|
||||
using GFramework.Core.architecture;
|
||||
|
||||
namespace GFramework.framework.rule;
|
||||
namespace GFramework.Core.rule;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个接口,用于设置架构实例
|
||||
@ -1,7 +1,7 @@
|
||||
using GFramework.framework.architecture;
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.architecture;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.system;
|
||||
namespace GFramework.Core.system;
|
||||
|
||||
/// <summary>
|
||||
/// 抽象系统基类,实现系统接口的基本功能
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.system;
|
||||
namespace GFramework.Core.system;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个接口,表示可以获取系统的对象。
|
||||
@ -1,9 +1,9 @@
|
||||
using GFramework.framework.events;
|
||||
using GFramework.framework.model;
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.framework.utility;
|
||||
using GFramework.Core.events;
|
||||
using GFramework.Core.model;
|
||||
using GFramework.Core.rule;
|
||||
using GFramework.Core.utility;
|
||||
|
||||
namespace GFramework.framework.system;
|
||||
namespace GFramework.Core.system;
|
||||
|
||||
/// <summary>
|
||||
/// 系统接口,定义了系统的基本行为和功能
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.framework.rule;
|
||||
using GFramework.Core.rule;
|
||||
|
||||
namespace GFramework.framework.utility;
|
||||
namespace GFramework.Core.utility;
|
||||
|
||||
/// <summary>
|
||||
/// 定义一个接口,表示可以获取工具类的对象
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.framework.utility;
|
||||
namespace GFramework.Core.utility;
|
||||
|
||||
/// <summary>
|
||||
/// IUtility接口定义了通用工具类的基本契约
|
||||
@ -27,24 +27,26 @@
|
||||
<None Include="README.md" Pack="true" PackagePath="" />
|
||||
<None Remove="GFramework.Generator\**" />
|
||||
<None Remove="GFramework.Generator.Attributes\**" />
|
||||
<None Remove="GFramework.Core\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="GFramework.Generator\**" />
|
||||
<Compile Remove="GFramework.Generator.Attributes\**" />
|
||||
<Compile Remove="GFramework.Core\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Remove="GFramework.Generator\**" />
|
||||
<EmbeddedResource Remove="GFramework.Generator.Attributes\**" />
|
||||
<EmbeddedResource Remove="GFramework.Core\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- 引用 Source Generator -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="GFramework.Generator\GFramework.Generator.csproj"
|
||||
OutputItemType="Analyzer"
|
||||
ReferenceOutputAssembly="false"/>
|
||||
<ProjectReference Include="GFramework.Generator\GFramework.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="GFramework.Generator.Attributes\GFramework.Generator.Attributes.csproj"/>
|
||||
<ProjectReference Include="GFramework.Core\GFramework.Core.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -6,6 +6,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.Generator", "GFr
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.Generator.Attributes", "GFramework.Generator.Attributes\GFramework.Generator.Attributes.csproj", "{84C5C3C9-5620-4924-BA04-92F813F2B70F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.Core", "GFramework.Core\GFramework.Core.csproj", "{A6D5854D-79EA-487A-9ED9-396E6A1F8031}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -24,5 +26,9 @@ Global
|
||||
{84C5C3C9-5620-4924-BA04-92F813F2B70F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{84C5C3C9-5620-4924-BA04-92F813F2B70F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{84C5C3C9-5620-4924-BA04-92F813F2B70F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A6D5854D-79EA-487A-9ED9-396E6A1F8031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A6D5854D-79EA-487A-9ED9-396E6A1F8031}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A6D5854D-79EA-487A-9ED9-396E6A1F8031}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A6D5854D-79EA-487A-9ED9-396E6A1F8031}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user