File tree Expand file tree Collapse file tree
src/BootstrapBlazor.Server/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Licensed to the .NET Foundation under one or more agreements.
1+ // Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the Apache 2.0 License
33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -99,7 +99,10 @@ private async Task GetCompletionsAsync()
9999 if ( ! string . IsNullOrEmpty ( chatMessage . Content ) )
100100 {
101101 msg . Content += chatMessage . Content ;
102+ // TODO: NET 11 误报警告
103+ #pragma warning disable BL0012 // Unnecessary StateHasChanged call
102104 StateHasChanged ( ) ;
105+ #pragma warning restore BL0012 // Unnecessary StateHasChanged call
103106 }
104107 }
105108
Original file line number Diff line number Diff line change 1- // Licensed to the .NET Foundation under one or more agreements.
1+ // Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the Apache 2.0 License
33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -52,7 +52,10 @@ private async Task ToggleAuthor()
5252 if ( ! IsAuth )
5353 {
5454 mock . Login ( ) ;
55+ // TODO: NET 11 误报警告
56+ #pragma warning disable BL0013 // AuthenticationStateProvider.GetAuthenticationStateAsync used without subscribing to AuthenticationStateChanged
5557 var state = await mock . GetAuthenticationStateAsync ( ) ;
58+ #pragma warning restore BL0013 // AuthenticationStateProvider.GetAuthenticationStateAsync used without subscribing to AuthenticationStateChanged
5659 UserName = state . User . Identity ? . Name ;
5760 IsAuth = state . User . Identity ? . IsAuthenticated ?? false ;
5861 }
Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ protected virtual ValueTask DisposeAsyncCore(bool disposing)
132132
133133 public async ValueTask DisposeAsync ( )
134134 {
135+ // TODO: NET 11 误报警告
136+ #pragma warning disable BL0016 // Unguarded JS interop call
135137 await DisposeAsyncCore ( true ) ;
138+ #pragma warning restore BL0016 // Unguarded JS interop call
136139 GC . SuppressFinalize ( this ) ;
137140 }
138141
You can’t perform that action at this time.
0 commit comments