diff --git a/ShadowViewer.Analyzer/Generators/DIGenerator.cs b/ShadowViewer.Analyzer/Generators/DIGenerator.cs index 781eaef..0d04ed0 100644 --- a/ShadowViewer.Analyzer/Generators/DIGenerator.cs +++ b/ShadowViewer.Analyzer/Generators/DIGenerator.cs @@ -30,17 +30,20 @@ public void Execute(GeneratorExecutionContext context) List constructor = new(); var di = new List { - new("ICallableService","Caller","caller"), - new("ISqlSugarClient","Db","db"), - new("CompressService","Compressor","compressService"), - new("PluginLoader","PluginService","pluginService"), - new("ILogger","Logger","logger"), - new("ResponderService","ResponderService","responderService"), + new("PluginLoader","PluginService","pluginService","插件服务"), + new("ICallableService","Caller","caller","触发器服务"), + new("ISqlSugarClient","Db","db","数据库服务"), + new("CompressService","Compressor","compressService","解压缩服务"), + new("ILogger","Logger","logger","日志服务"), + new("ResponderService","ResponderService","responderService","响应器服务"), }; for (var i = 0; i < di.Count; i++) { if (!b[i]) continue; p += $@" + /// + /// {di[i].Comment} + /// public {di[i].ClassTypeName} {di[i].ClassName} {{ get; }}"; init += $@" {di[i].ClassName} = {di[i].ConstructorName};"; diff --git a/ShadowViewer.Analyzer/Model/Di.cs b/ShadowViewer.Analyzer/Model/Di.cs index ade6d9e..c1d502d 100644 --- a/ShadowViewer.Analyzer/Model/Di.cs +++ b/ShadowViewer.Analyzer/Model/Di.cs @@ -15,25 +15,31 @@ public class Di /// /// /// - public Di(string classTypeName, string className, string constructorName) + /// + public Di(string classTypeName, string className, string constructorName,string comment = "") { ClassTypeName = classTypeName; ClassName = className; ConstructorName = constructorName; + Comment = comment; } /// - /// + /// 类类型名 /// public string ClassTypeName { get; } /// - /// + /// 类名 /// public string ClassName { get; } /// - /// + /// 构造函数名称 /// public string ConstructorName { get;} + /// + /// 注释 + /// + public string Comment { get;} } } diff --git a/ShadowViewer.Analyzer/ShadowViewer.Analyzer.csproj b/ShadowViewer.Analyzer/ShadowViewer.Analyzer.csproj index 3ae95f8..41a8845 100644 --- a/ShadowViewer.Analyzer/ShadowViewer.Analyzer.csproj +++ b/ShadowViewer.Analyzer/ShadowViewer.Analyzer.csproj @@ -5,7 +5,7 @@ enable enable 10 - 1.2.1.1 + 1.2.5.1 true ShadowViewer.Analyzer kitUIN @@ -17,7 +17,7 @@ zh-CN Copyright 2023 kitUIN;wasdk;ShadowViewer;winui - .\..\NugetPackages + ..\..\..\NugetPackages MSB3277 true