From 6e3954eb3e3d74ea39fd6de6d5a2c7176792802c Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 28 Mar 2026 13:06:01 +0800 Subject: [PATCH] =?UTF-8?q?docs(GFramework.Core):=20=E6=9B=B4=E6=96=B0=20C?= =?UTF-8?q?ontextAwareServiceExtensions=20=E6=96=87=E6=A1=A3=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 GetSystem 方法添加 InvalidOperationException 异常文档说明 - 为 GetModel 方法添加 InvalidOperationException 异常文档说明 - 为 GetUtility 方法添加 InvalidOperationException 异常文档说明 - 清理文件末尾多余空行 --- GFramework.Core/Extensions/ContextAwareServiceExtensions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GFramework.Core/Extensions/ContextAwareServiceExtensions.cs b/GFramework.Core/Extensions/ContextAwareServiceExtensions.cs index cb82199..2b0b8ec 100644 --- a/GFramework.Core/Extensions/ContextAwareServiceExtensions.cs +++ b/GFramework.Core/Extensions/ContextAwareServiceExtensions.cs @@ -37,6 +37,7 @@ public static class ContextAwareServiceExtensions /// 实现 IContextAware 接口的对象 /// 指定类型的系统实例 /// 当 contextAware 为 null 时抛出 + /// 当指定系统未注册时抛出 public static TSystem GetSystem(this IContextAware contextAware) where TSystem : class, ISystem { ArgumentNullException.ThrowIfNull(contextAware); @@ -52,6 +53,7 @@ public static class ContextAwareServiceExtensions /// 实现 IContextAware 接口的对象 /// 指定类型的模型实例 /// 当 contextAware 为 null 时抛出 + /// 当指定模型未注册时抛出 public static TModel GetModel(this IContextAware contextAware) where TModel : class, IModel { ArgumentNullException.ThrowIfNull(contextAware); @@ -67,6 +69,7 @@ public static class ContextAwareServiceExtensions /// 实现 IContextAware 接口的对象 /// 指定类型的工具实例 /// 当 contextAware 为 null 时抛出 + /// 当指定工具未注册时抛出 public static TUtility GetUtility(this IContextAware contextAware) where TUtility : class, IUtility { ArgumentNullException.ThrowIfNull(contextAware);