Skip to content

Commit

Permalink
修正文字错误
Browse files Browse the repository at this point in the history
  • Loading branch information
andywu188 committed May 26, 2024
1 parent cff1323 commit 5c2ce23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions NewLife.Agent/Command/CommandHandlerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
namespace NewLife.Agent.Command;

/// <summary>
///
/// 命令工厂
/// </summary>
public class CommandFactory
{
private readonly List<BaseCommandHandler> _commandHandlerList;
private Dictionary<String, BaseCommandHandler> _commandHandlerDict = new(StringComparer.OrdinalIgnoreCase);

/// <summary>
///
/// 命令工厂
/// </summary>
/// <param name="service">服务对象</param>
/// <param name="customCommandHandlerAssembly">自定义命令处理程序所在程序集</param>
Expand All @@ -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<BaseCommandHandler>();
foreach (var type in commandHandlerTypes)
Expand Down
2 changes: 1 addition & 1 deletion NewLife.Agent/CommandHandler/ShowStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5c2ce23

Please sign in to comment.