-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CancellationToken support to Async methods (#146)
- Loading branch information
Showing
5 changed files
with
120 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Blazored.LocalStorage | ||
{ | ||
internal interface IStorageProvider | ||
{ | ||
void Clear(); | ||
ValueTask ClearAsync(); | ||
ValueTask ClearAsync(CancellationToken? cancellationToken = null); | ||
bool ContainKey(string key); | ||
ValueTask<bool> ContainKeyAsync(string key); | ||
ValueTask<bool> ContainKeyAsync(string key, CancellationToken? cancellationToken = null); | ||
string GetItem(string key); | ||
ValueTask<string> GetItemAsync(string key); | ||
ValueTask<string> GetItemAsync(string key, CancellationToken? cancellationToken = null); | ||
string Key(int index); | ||
ValueTask<string> KeyAsync(int index); | ||
ValueTask<string> KeyAsync(int index, CancellationToken? cancellationToken = null); | ||
int Length(); | ||
ValueTask<int> LengthAsync(); | ||
ValueTask<int> LengthAsync(CancellationToken? cancellationToken = null); | ||
void RemoveItem(string key); | ||
ValueTask RemoveItemAsync(string key); | ||
ValueTask RemoveItemAsync(string key, CancellationToken? cancellationToken = null); | ||
void SetItem(string key, string data); | ||
ValueTask SetItemAsync(string key, string data); | ||
ValueTask SetItemAsync(string key, string data, CancellationToken? cancellationToken = null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.