Skip to content

Commit 72bf3fc

Browse files
committed
revert: 撤销 DisposeAsync 逻辑
1 parent 73b6de1 commit 72bf3fc

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

src/BootstrapBlazor/Components/BaseComponents/DynamicElement.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace BootstrapBlazor.Components;
1212
/// <para lang="zh">动态元素组件</para>
1313
/// <para lang="en">Dynamic element component</para>
1414
/// </summary>
15-
public class DynamicElement : BootstrapComponentBase, IAsyncDisposable
15+
public class DynamicElement : BootstrapComponentBase
1616
{
1717
/// <summary>
1818
/// <para lang="zh">获得/设置 TagName 属性 默认为 div</para>
@@ -176,29 +176,4 @@ private async Task OnTriggerContextMenu(MouseEventArgs e)
176176
await OnContextMenu(e);
177177
}
178178
}
179-
180-
/// <summary>
181-
/// <para lang="zh">异步释放资源</para>
182-
/// <para lang="en">Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously</para>
183-
/// </summary>
184-
/// <param name="disposing"></param>
185-
protected virtual async ValueTask DisposeAsync(bool disposing)
186-
{
187-
if (disposing)
188-
{
189-
OnClick = null;
190-
OnDoubleClick = null;
191-
OnContextMenu = null;
192-
ChildContent = null;
193-
}
194-
}
195-
196-
/// <summary>
197-
/// <inheritdoc/>
198-
/// </summary>
199-
public async ValueTask DisposeAsync()
200-
{
201-
await DisposeAsync(true);
202-
GC.SuppressFinalize(this);
203-
}
204179
}

0 commit comments

Comments
 (0)