Skip to content

Commit 426edeb

Browse files
committed
revert: 撤销 IAsyncDisposable 接口实现
1 parent c866dec commit 426edeb

2 files changed

Lines changed: 1 addition & 42 deletions

File tree

src/components/BootstrapBlazor.DockView/Components/DockViewComponent.razor.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -191,20 +191,4 @@ private async Task OnClickBar()
191191
internal void SetVisible(bool visible) => Visible = visible;
192192

193193
internal void SetLock(bool isLock) => IsLock = isLock;
194-
195-
/// <summary>
196-
/// <inheritdoc/>
197-
/// </summary>
198-
/// <param name="disposing"></param>
199-
protected override void Dispose(bool disposing)
200-
{
201-
base.Dispose(disposing);
202-
203-
if (OnClickTitleBarCallback != null)
204-
{
205-
OnClickTitleBarCallback = null;
206-
}
207-
208-
DockView.RemoveComponentState(Key);
209-
}
210194
}

src/components/BootstrapBlazor.DockView/Components/DockViewTitleBar.razor.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff 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 : IAsyncDisposable
13+
public partial class DockViewTitleBar
1414
{
1515
/// <summary>
1616
/// <para lang="zh">获得/设置 标题前置图标点击回调方法,默认为 null</para>
@@ -40,29 +40,4 @@ 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-
}
6843
}

0 commit comments

Comments
 (0)