File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/BootstrapBlazor.Server/Components/Pages Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,14 @@ public partial class CacheList
1919 [ Inject , NotNull ]
2020 private IStringLocalizer < CacheList > ? Localizer { get ; set ; }
2121
22- private List < object > _cacheList = [ ] ;
22+ private List < object ? > _cacheList = [ ] ;
2323
2424 /// <summary>
2525 /// <inheritdoc/>
2626 /// </summary>
27- protected override async Task OnParametersSetAsync ( )
27+ protected override void OnInitialized ( )
2828 {
29- await base . OnParametersSetAsync ( ) ;
30-
31- await Task . Yield ( ) ;
29+ base . OnInitialized ( ) ;
3230 UpdateCacheList ( ) ;
3331 }
3432
@@ -51,15 +49,15 @@ private void OnRefresh()
5149
5250 private void UpdateCacheList ( )
5351 {
54- _cacheList = CacheManager . Keys . OrderBy ( i => i . ToString ( ) ) . Select ( key =>
52+ _cacheList = [ .. CacheManager . Keys . OrderBy ( i => i . ToString ( ) ) . Select ( key =>
5553 {
5654 ICacheEntry ? entry = null ;
5755 if ( CacheManager . TryGetCacheEntry ( key , out var val ) )
5856 {
5957 entry = val ;
6058 }
61- return ( object ) entry ! ;
62- } ) . ToList ( ) ;
59+ return entry ;
60+ } ) ] ;
6361 }
6462
6563 private static string GetKey ( object data ) => data is ICacheEntry entry ? entry . Key . ToString ( ) ! : "-" ;
You can’t perform that action at this time.
0 commit comments