File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
LinkDotNet.Blog.Web/Shared/Services Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ namespace LinkDotNet.Blog.Web.Shared.Services;
44
55public interface ILocalStorageService
66{
7- Task < bool > ContainKeyAsync ( string key ) ;
7+ ValueTask < bool > ContainKeyAsync ( string key ) ;
88
9- Task < T > GetItemAsync < T > ( string key ) ;
9+ ValueTask < T > GetItemAsync < T > ( string key ) ;
1010
11- Task SetItemAsync < T > ( string key , T value ) ;
11+ ValueTask SetItemAsync < T > ( string key , T value ) ;
1212}
Original file line number Diff line number Diff line change @@ -12,17 +12,17 @@ public LocalStorageService(ProtectedLocalStorage localStorage)
1212 this . localStorage = localStorage ;
1313 }
1414
15- public async Task < bool > ContainKeyAsync ( string key )
15+ public async ValueTask < bool > ContainKeyAsync ( string key )
1616 {
1717 return ( await localStorage . GetAsync < object > ( key ) ) . Success ;
1818 }
1919
20- public async Task < T > GetItemAsync < T > ( string key )
20+ public async ValueTask < T > GetItemAsync < T > ( string key )
2121 {
2222 return ( await localStorage . GetAsync < T > ( key ) ) . Value ;
2323 }
2424
25- public async Task SetItemAsync < T > ( string key , T value )
25+ public async ValueTask SetItemAsync < T > ( string key , T value )
2626 {
2727 await localStorage . SetAsync ( key , value ) ;
2828 }
You can’t perform that action at this time.
0 commit comments