Skip to content

Commit 122d4b3

Browse files
committed
doc: 增加注释
1 parent 3bdda01 commit 122d4b3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/extensions/BootstrapBlazor.TcpSocket/Extensions/ITcpSocketClientExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static void RemoveDataPackageAdapter(this ITcpSocketClient client, Func<R
101101
}
102102

103103
/// <summary>
104-
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法
104+
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法,切记使用 <see cref="RemoveDataPackageAdapter(ITcpSocketClient, Func{ReadOnlyMemory{byte}, ValueTask})"/> 移除数据处理委托防止内存泄露
105105
/// </summary>
106106
/// <param name="client"><see cref="ITcpSocketClient"/> 实例</param>
107107
/// <param name="handler"><see cref="IDataPackageHandler"/> 数据处理实例</param>
@@ -115,7 +115,7 @@ public static void AddDataPackageAdapter(this ITcpSocketClient client, IDataPack
115115

116116
/// <summary>
117117
/// Configures the specified <see cref="ITcpSocketClient"/> to use a data package adapter and a callback function
118-
/// for processing received data.
118+
/// for processing received data. 切记使用 <see cref="RemoveDataPackageAdapter(ITcpSocketClient, Func{ReadOnlyMemory{byte}, ValueTask})"/> 移除数据处理委托防止内存泄露
119119
/// </summary>
120120
/// <remarks>This method sets up the <paramref name="client"/> to process incoming data using the
121121
/// specified <paramref name="adapter"/> and <paramref name="socketDataConverter"/>. The <paramref
@@ -175,7 +175,7 @@ public static void RemoveDataPackageAdapter<TEntity>(this ITcpSocketClient clien
175175
}
176176

177177
/// <summary>
178-
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法
178+
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法。切记使用 <see cref="RemoveDataPackageAdapter"/> 移除数据处理委托防止内存泄露
179179
/// </summary>
180180
/// <typeparam name="TEntity"></typeparam>
181181
/// <param name="client"></param>
@@ -189,7 +189,7 @@ public static void AddDataPackageAdapter<TEntity>(this ITcpSocketClient client,
189189

190190
/// <summary>
191191
/// Configures the specified <see cref="ITcpSocketClient"/> to use a custom data package adapter and callback
192-
/// function.
192+
/// function. 切记使用 <see cref="RemoveDataPackageAdapter"/> 移除数据处理委托防止内存泄露
193193
/// </summary>
194194
/// <remarks>This method sets up the <paramref name="client"/> to use the specified <paramref
195195
/// name="adapter"/> for handling incoming data. If the <typeparamref name="TEntity"/> type is decorated with a <see
@@ -251,7 +251,7 @@ async ValueTask ReceivedCallback(ReadOnlyMemory<byte> buffer)
251251
}
252252

253253
/// <summary>
254-
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法
254+
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法。切记使用 <see cref="RemoveDataPackageAdapter"/> 移除数据处理委托防止内存泄露
255255
/// </summary>
256256
/// <param name="client"><see cref="ITcpSocketClient"/> 实例</param>
257257
/// <param name="handler"><see cref="IDataPackageHandler"/> 数据处理实例</param>

0 commit comments

Comments
 (0)