Skip to content

Commit 4309091

Browse files
committed
refactor: 更新接口
1 parent c72f0b1 commit 4309091

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ protected async Task OnErrorAsync(Exception exception)
216216
}
217217
}
218218

219-
private readonly List<ComponentBase> _cache = [];
219+
private readonly List<IHandlerException> _cache = [];
220220

221221
/// <summary>
222222
/// <inheritdoc/>
223223
/// </summary>
224224
/// <param name="component"></param>
225-
public void Register(ComponentBase component)
225+
public void Register(IHandlerException component)
226226
{
227227
_cache.Add(component);
228228
}
@@ -231,7 +231,7 @@ public void Register(ComponentBase component)
231231
/// <inheritdoc/>
232232
/// </summary>
233233
/// <param name="component"></param>
234-
public void UnRegister(ComponentBase component)
234+
public void UnRegister(IHandlerException component)
235235
{
236236
_cache.Remove(component);
237237
}

src/BootstrapBlazor/Components/ErrorLogger/IErrorLogger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public interface IErrorLogger
3636
/// 注册方法
3737
/// </summary>
3838
/// <param name="component"></param>
39-
void Register(ComponentBase component);
39+
void Register(IHandlerException component);
4040

4141
/// <summary>
4242
/// 注销方法
4343
/// </summary>
4444
/// <param name="component"></param>
45-
void UnRegister(ComponentBase component);
45+
void UnRegister(IHandlerException component);
4646
}

0 commit comments

Comments
 (0)