Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<PackageReference Include="BootstrapBlazor.RDKit" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="9.0.1" />
<PackageReference Include="BootstrapBlazor.SmilesDrawer" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Socket" Version="9.0.6" />
<PackageReference Include="BootstrapBlazor.Socket" Version="9.0.10" />
<PackageReference Include="BootstrapBlazor.Sortable" Version="9.0.3" />
<PackageReference Include="BootstrapBlazor.Splitting" Version="9.0.3" />
<PackageReference Include="BootstrapBlazor.SvgEditor" Version="9.0.4" />
Expand Down Expand Up @@ -98,8 +98,8 @@
<Using Include="BootstrapBlazor.Server.Extensions" />
<Using Include="BootstrapBlazor.Server.Services" />
<Using Include="BootstrapBlazor.Socket.DataAdapters" />
<Using Include="BootstrapBlazor.Socket.DataHandlers" />
<Using Include="BootstrapBlazor.Socket.DataConverters" />
<Using Include="BootstrapBlazor.Socket.DataHandlers" />
<Using Include="BootstrapBlazor.TcpSocket" />
<Using Include="Microsoft.AspNetCore.Components" />
<Using Include="Microsoft.Extensions.Configuration" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ _dataAdapter.ReceivedCallBack = async Data =>
// 此处接收到的数据 Data 为完整响应数据
};</Pre>
<Pre>// 实战中可以使用 ITcpSocketClient 扩展方法 AddDataPackageAdapter 简化代码
// 如果 _client 实例在当前页面不销毁时,切记使用 AddDataPackageAdapter 移除当前页面加载的 UpdateReceiveLog 回调方法避免内存泄露
// 如果 _client 实例在当前页面不销毁时,切记使用 RemoveDataPackageAdapter 移除当前页面加载的 UpdateReceiveLog 回调方法避免内存泄露
// _client.RemoveDataPackageAdapter(UpdateReceiveLog);
_client.AddDataPackageAdapter(_dataAdapter, UpdateReceiveLog);</Pre>

<p>本例中使用的模拟服务端代码如下:</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ protected override void OnInitialized()

// 实战中可以通过下面一句话设置数据适配器与回调方法
// _client.AddDataPackageAdapter(_dataAdapter, UpdateReceiveLog);

}

private async Task OnConnectAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class MockEntity
</ul>
<p>组件库内置了大量数据类型转换器</p>
<ul class="ul-demo">
<li><code>DataByteConverter</code> 转成 byte 类型</li>
<li><code>DataByteArrayConverter</code> 转成 byte[] 数组类型</li>
<li><code>DataStringConverter</code> 转成 string 字符串类型</li>
<li><code>DataEnumConverter</code> 转成 enum 枚举类型</li>
Expand Down
Loading