File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ public TokenCacheFile(string filePath)
1010 _filePath = filePath ;
1111 }
1212
13- public async Task StoreTokenAsync ( TokenContainer token , CancellationToken cancellationToken )
13+ public async ValueTask StoreTokenAsync ( TokenContainerCacheable token , CancellationToken cancellationToken )
1414 {
1515 var json = JsonSerializer . Serialize ( token ) ;
1616 await File . WriteAllTextAsync ( _filePath , json , cancellationToken ) ;
1717 }
1818
19- public async Task < TokenContainer ? > GetTokenAsync ( CancellationToken cancellationToken )
19+ public async ValueTask < TokenContainerCacheable ? > GetTokenAsync ( CancellationToken cancellationToken )
2020 {
2121 var token = File . Exists ( _filePath )
22- ? JsonSerializer . Deserialize < TokenContainer > ( await File . ReadAllTextAsync ( _filePath , cancellationToken ) )
22+ ? JsonSerializer . Deserialize < TokenContainerCacheable > ( await File . ReadAllTextAsync ( _filePath , cancellationToken ) )
2323 : null ;
2424
2525 return token ;
You can’t perform that action at this time.
0 commit comments