File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.DockView/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace BootstrapBlazor.Components;
1010/// <para lang="zh">DockView 标题栏组件</para>
1111/// <para lang="en">DockView title bar component</para>
1212/// </summary>
13- public partial class DockViewTitleBar
13+ public partial class DockViewTitleBar : IAsyncDisposable
1414{
1515 /// <summary>
1616 /// <para lang="zh">获得/设置 标题前置图标点击回调方法,默认为 null</para>
@@ -40,4 +40,29 @@ private async Task OnClickBar()
4040 await OnClickBarCallback ( ) ;
4141 }
4242 }
43+
44+ /// <summary>
45+ /// <inheritdoc/>
46+ /// </summary>
47+ /// <param name="disposing"></param>
48+ /// <returns></returns>
49+ protected virtual ValueTask DisposeAsync ( bool disposing )
50+ {
51+ if ( disposing )
52+ {
53+ OnClickBarCallback = null ;
54+ }
55+
56+ return ValueTask . CompletedTask ;
57+ }
58+
59+ /// <summary>
60+ /// <inheritdoc/>
61+ /// </summary>
62+ /// <returns></returns>
63+ public async ValueTask DisposeAsync ( )
64+ {
65+ await DisposeAsync ( true ) ;
66+ GC . SuppressFinalize ( this ) ;
67+ }
4368}
You can’t perform that action at this time.
0 commit comments