Skip to content

Commit

Permalink
✨ update
Browse files Browse the repository at this point in the history
  • Loading branch information
xinansky committed Jun 13, 2024
1 parent 333f298 commit 6f741c2
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
Binary file modified Plugins/AIO.Common.dll
Binary file not shown.
45 changes: 45 additions & 0 deletions Plugins/AIO.Common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14886,6 +14886,51 @@
</summary>
<exception cref="T:System.Exception">命名空间未开始</exception>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotCode(System.String)">
<summary>
summary 注释
</summary>
<param name="content"> 注释内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotCode(System.String[])">
<summary>
summary 注释
</summary>
<param name="contents"> 注释内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotReturns(System.String)">
<summary>
summary 注释
</summary>
<param name="content"> 注释内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotExpressionCref(System.String,System.String)">
<summary>
summary 注释
</summary>
<param name="cref"> cref </param>
<param name="content"> 注释内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotTypeParam(System.String,System.String)">
<summary>
summary 注释
</summary>
<param name="name"> 参数名 </param>
<param name="content"> 注释内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotC(System.String)">
<summary>
summary 注释
</summary>
<param name="content"> 注释内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotParam(System.String,System.String)">
<summary>
summary 注释
</summary>
<param name="param"> 参数名 </param>
<param name="content"> 内容 </param>
</member>
<member name="M:AIO.ScriptTextBuilder.AnnotSummary(System.String)">
<summary>
summary 注释
Expand Down
88 changes: 88 additions & 0 deletions Tools~/Common/Common/Script/Tools/Generate/ScriptTextBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,94 @@ public ScriptTextBuilder DecNamespace()

#region Annot

/// <summary>
/// summary 注释
/// </summary>
/// <param name="content"> 注释内容 </param>
public ScriptTextBuilder AnnotCode(string content)
{
if (IsNullOrEmpty(content)) return this;
Builder.AppendFormat("{0}/// <code>{1}", indent, NewLine);
Builder.AppendFormat("{0}/// {1}{2}", indent, content, NewLine);
Builder.AppendFormat("{0}/// </code>{1}", indent, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
/// <param name="contents"> 注释内容 </param>
public ScriptTextBuilder AnnotCode(params string[] contents)
{
Builder.AppendFormat("{0}/// <code>{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}/// </code>{1}", indent, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
/// <param name="content"> 注释内容 </param>
public ScriptTextBuilder AnnotReturns(string content)
{
if (IsNullOrEmpty(content)) return this;
Builder.AppendFormat("{0}/// <returns>{1}</returns>{2}", indent, content, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
/// <param name="cref"> cref </param>
/// <param name="content"> 注释内容 </param>
public ScriptTextBuilder AnnotExpressionCref(string cref, string content)
{
if (IsNullOrEmpty(content)) return this;
Builder.AppendFormat("{0}/// <expression cref=\"{1}\">{2}</expression>{3}", indent, cref, content, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
/// <param name="name"> 参数名 </param>
/// <param name="content"> 注释内容 </param>
public ScriptTextBuilder AnnotTypeParam(string name, string content)
{
if (IsNullOrEmpty(content)) return this;
Builder.AppendFormat("{0}/// <typeparam name=\"{1}\">{2}</typeparam>{3}", indent, name, content, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
/// <param name="content"> 注释内容 </param>
public ScriptTextBuilder AnnotC(string content)
{
if (IsNullOrEmpty(content)) return this;
Builder.AppendFormat("{0}/// <c>{1}</c>{2}", indent, content, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
/// <param name="param"> 参数名 </param>
/// <param name="content"> 内容 </param>
public ScriptTextBuilder AnnotParam(string param, string content)
{
if (IsNullOrEmpty(param)) return this;
Builder.AppendFormat("{0}/// <param name=\"{1}\">{2}</param>{3}", indent, param, content, NewLine);
return this;
}

/// <summary>
/// summary 注释
/// </summary>
Expand Down

0 comments on commit 6f741c2

Please sign in to comment.