Skip to content

Commit 54b8780

Browse files
committed
refactor: 变量规范化消除警告信息
1 parent c5935af commit 54b8780

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BootstrapBlazor/Services/BootstrapServiceBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ public abstract class BootstrapServiceBase<TOption>
2323
/// <returns></returns>
2424
protected async Task Invoke(TOption option, ComponentBase? component = null)
2525
{
26-
var (Key, Callback) = component != null
26+
var (_, callback) = component != null
2727
? Cache.FirstOrDefault(k => k.Key == component)
2828
: Cache.FirstOrDefault();
29-
if (Callback == null)
29+
if (callback == null)
3030
{
3131
#if NET8_0_OR_GREATER
3232
throw new InvalidOperationException($"{GetType().Name} not registered. refer doc https://www.blazor.zone/install-webapp step 7 for BootstrapBlazorRoot");
3333
#else
3434
throw new InvalidOperationException($"{GetType().Name} not registered. refer doc https://www.blazor.zone/install-server step 7 for BootstrapBlazorRoot");
3535
#endif
3636
}
37-
await Callback.Invoke(option);
37+
await callback(option);
3838
}
3939

4040
/// <summary>

0 commit comments

Comments
 (0)