From 5c2ce2317e3a1c79a4011aab90f3a84cc619e84e Mon Sep 17 00:00:00 2001 From: Andy Wu Date: Sun, 26 May 2024 23:49:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=87=E5=AD=97=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NewLife.Agent/Command/CommandHandlerFactory.cs | 6 +++--- NewLife.Agent/CommandHandler/ShowStatus.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NewLife.Agent/Command/CommandHandlerFactory.cs b/NewLife.Agent/Command/CommandHandlerFactory.cs index d63d8c3..47c2de6 100644 --- a/NewLife.Agent/Command/CommandHandlerFactory.cs +++ b/NewLife.Agent/Command/CommandHandlerFactory.cs @@ -3,7 +3,7 @@ namespace NewLife.Agent.Command; /// -/// +/// 命令工厂 /// public class CommandFactory { @@ -11,7 +11,7 @@ public class CommandFactory private Dictionary _commandHandlerDict = new(StringComparer.OrdinalIgnoreCase); /// - /// + /// 命令工厂 /// /// 服务对象 /// 自定义命令处理程序所在程序集 @@ -33,7 +33,7 @@ public CommandFactory(ServiceBase service, params Assembly[] customCommandHandle } } - // 使用反射获取所有实现了ICommandHandler接口的类型 + // 使用反射获取所有实现了BaseCommandHandler的类型 var commandHandlerTypes = assemblies.Values.SelectMany(n => n.GetTypes().Where(t => typeof(BaseCommandHandler).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract)).ToList(); var commandHandlers = new List(); foreach (var type in commandHandlerTypes) diff --git a/NewLife.Agent/CommandHandler/ShowStatus.cs b/NewLife.Agent/CommandHandler/ShowStatus.cs index 76c78a5..bc3c5c6 100644 --- a/NewLife.Agent/CommandHandler/ShowStatus.cs +++ b/NewLife.Agent/CommandHandler/ShowStatus.cs @@ -33,7 +33,7 @@ public override void Process(String[] args) Console.WriteLine("服务:{0}({1})", Service.DisplayName, name); else Console.WriteLine("服务:{0}", name); - Console.WriteLine("描述:{0}", Description); + Console.WriteLine("描述:{0}", Service.Description); Console.Write("状态:{0} ", Service.Host.Name); String status;