diff --git a/Plugins/AIO.Common.dll b/Plugins/AIO.Common.dll index 774a4d4b..4f562c49 100644 Binary files a/Plugins/AIO.Common.dll and b/Plugins/AIO.Common.dll differ diff --git a/Plugins/AIO.Common.xml b/Plugins/AIO.Common.xml index 79dd5dbe..48177498 100644 --- a/Plugins/AIO.Common.xml +++ b/Plugins/AIO.Common.xml @@ -14886,6 +14886,51 @@ 命名空间未开始 + + + summary 注释 + + 注释内容 + + + + summary 注释 + + 注释内容 + + + + summary 注释 + + 注释内容 + + + + summary 注释 + + cref + 注释内容 + + + + summary 注释 + + 参数名 + 注释内容 + + + + summary 注释 + + 注释内容 + + + + summary 注释 + + 参数名 + 内容 + summary 注释 diff --git a/Tools~/Common/Common/Script/Tools/Generate/ScriptTextBuilder.cs b/Tools~/Common/Common/Script/Tools/Generate/ScriptTextBuilder.cs index e7761540..0913b80c 100644 --- a/Tools~/Common/Common/Script/Tools/Generate/ScriptTextBuilder.cs +++ b/Tools~/Common/Common/Script/Tools/Generate/ScriptTextBuilder.cs @@ -54,6 +54,94 @@ public ScriptTextBuilder DecNamespace() #region Annot + /// + /// summary 注释 + /// + /// 注释内容 + public ScriptTextBuilder AnnotCode(string content) + { + if (IsNullOrEmpty(content)) return this; + Builder.AppendFormat("{0}/// {1}", indent, NewLine); + Builder.AppendFormat("{0}/// {1}{2}", indent, content, NewLine); + Builder.AppendFormat("{0}/// {1}", indent, NewLine); + return this; + } + + /// + /// summary 注释 + /// + /// 注释内容 + public ScriptTextBuilder AnnotCode(params string[] contents) + { + Builder.AppendFormat("{0}/// {1}", indent, NewLine); + for (var i = 1; i < contents.Length; i++) + { + if (IsNullOrEmpty(contents[i])) continue; + Builder.AppendFormat("{0}/// {1}{2}", indent, contents[i], NewLine); + } + + Builder.AppendFormat("{0}/// {1}", indent, NewLine); + return this; + } + + /// + /// summary 注释 + /// + /// 注释内容 + public ScriptTextBuilder AnnotReturns(string content) + { + if (IsNullOrEmpty(content)) return this; + Builder.AppendFormat("{0}/// {1}{2}", indent, content, NewLine); + return this; + } + + /// + /// summary 注释 + /// + /// cref + /// 注释内容 + public ScriptTextBuilder AnnotExpressionCref(string cref, string content) + { + if (IsNullOrEmpty(content)) return this; + Builder.AppendFormat("{0}/// {2}{3}", indent, cref, content, NewLine); + return this; + } + + /// + /// summary 注释 + /// + /// 参数名 + /// 注释内容 + public ScriptTextBuilder AnnotTypeParam(string name, string content) + { + if (IsNullOrEmpty(content)) return this; + Builder.AppendFormat("{0}/// {2}{3}", indent, name, content, NewLine); + return this; + } + + /// + /// summary 注释 + /// + /// 注释内容 + public ScriptTextBuilder AnnotC(string content) + { + if (IsNullOrEmpty(content)) return this; + Builder.AppendFormat("{0}/// {1}{2}", indent, content, NewLine); + return this; + } + + /// + /// summary 注释 + /// + /// 参数名 + /// 内容 + public ScriptTextBuilder AnnotParam(string param, string content) + { + if (IsNullOrEmpty(param)) return this; + Builder.AppendFormat("{0}/// {2}{3}", indent, param, content, NewLine); + return this; + } + /// /// summary 注释 ///