Skip to content

Commit 4d40025

Browse files
authored
doc(Version): add version attribute on comments (#7820)
* doc: 增加版本信息 * doc: 增加版本信息 * refactor: 更新查找版本信息逻辑 * doc: 更新注释
1 parent 18ee382 commit 4d40025

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/BootstrapBlazor.Server/Services/ComponentAttributeCacheService.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
namespace BootstrapBlazor.Server.Services;
1313

1414
/// <summary>
15-
/// 组件属性缓存服务
15+
/// <para lang="zh">组件属性缓存服务</para>
16+
/// <para lang="en">Component Attribute Cache Service</para>
1617
/// </summary>
1718
public static class ComponentAttributeCacheService
1819
{
@@ -21,7 +22,8 @@ public static class ComponentAttributeCacheService
2122
private static XDocument? _xmlDoc;
2223

2324
/// <summary>
24-
/// 通过组件类型获取组件的 AttributeItem 列表
25+
/// <para lang="zh">通过组件类型获取组件的 AttributeItem 列表</para>
26+
/// <para lang="en">Get the list of AttributeItem for a component type</para>
2527
/// </summary>
2628
public static List<AttributeItem> GetAttributes(Type componentType)
2729
{
@@ -65,7 +67,8 @@ private static List<AttributeItem> GetAttributeCore(Type type)
6567
}
6668

6769
/// <summary>
68-
/// 从 XML 注释获取 summary(支持多语言)
70+
/// <para lang="zh">从 XML 注释获取 summary(支持多语言)</para>
71+
/// <para lang="en">Get the summary from XML comments (supports multiple languages)</para>
6972
/// </summary>
7073
private static string? GetSummary(XDocument? xmlDoc, PropertyInfo property)
7174
{
@@ -115,7 +118,8 @@ private static List<AttributeItem> GetAttributeCore(Type type)
115118
}
116119

117120
/// <summary>
118-
/// 从 XML 注释的 para version 节点获取版本信息
121+
/// <para lang="zh">从 XML 注释的 para version 节点获取版本信息</para>
122+
/// <para lang="en">Get the version information from the para version node in XML comments</para>
119123
/// </summary>
120124
private static string? GetVersion(XDocument? xmlDoc, PropertyInfo property)
121125
{
@@ -138,7 +142,8 @@ private static List<AttributeItem> GetAttributeCore(Type type)
138142
}
139143

140144
/// <summary>
141-
/// 获取友好的类型名称
145+
/// <para lang="zh">获取友好的类型名称</para>
146+
/// <para lang="en">Get the friendly type name</para>
142147
/// </summary>
143148
private static string GetFriendlyTypeName(Type type)
144149
{
@@ -168,7 +173,8 @@ private static string GetFriendlyTypeName(Type type)
168173
}
169174

170175
/// <summary>
171-
/// 获取 XML 文档
176+
/// <para lang="zh">获取 XML 文档</para>
177+
/// <para lang="en">Get the XML documentation</para>
172178
/// </summary>
173179
private static XDocument? GetXmlDocumentation(Assembly? assembly)
174180
{
@@ -217,7 +223,8 @@ private static string GetFriendlyTypeName(Type type)
217223
}
218224

219225
/// <summary>
220-
/// 清除缓存
226+
/// <para lang="zh">清除缓存</para>
227+
/// <para lang="en">Clear the cache</para>
221228
/// </summary>
222229
public static void ClearCache()
223230
{

0 commit comments

Comments
 (0)