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;
4
4
5
5
public interface ILocalStorageService
6
6
{
7
- Task < bool > ContainKeyAsync ( string key ) ;
7
+ ValueTask < bool > ContainKeyAsync ( string key ) ;
8
8
9
- Task < T > GetItemAsync < T > ( string key ) ;
9
+ ValueTask < T > GetItemAsync < T > ( string key ) ;
10
10
11
- Task SetItemAsync < T > ( string key , T value ) ;
11
+ ValueTask SetItemAsync < T > ( string key , T value ) ;
12
12
}
Original file line number Diff line number Diff line change @@ -12,17 +12,17 @@ public LocalStorageService(ProtectedLocalStorage localStorage)
12
12
this . localStorage = localStorage ;
13
13
}
14
14
15
- public async Task < bool > ContainKeyAsync ( string key )
15
+ public async ValueTask < bool > ContainKeyAsync ( string key )
16
16
{
17
17
return ( await localStorage . GetAsync < object > ( key ) ) . Success ;
18
18
}
19
19
20
- public async Task < T > GetItemAsync < T > ( string key )
20
+ public async ValueTask < T > GetItemAsync < T > ( string key )
21
21
{
22
22
return ( await localStorage . GetAsync < T > ( key ) ) . Value ;
23
23
}
24
24
25
- public async Task SetItemAsync < T > ( string key , T value )
25
+ public async ValueTask SetItemAsync < T > ( string key , T value )
26
26
{
27
27
await localStorage . SetAsync ( key , value ) ;
28
28
}
You can’t perform that action at this time.
0 commit comments