[Feature Request] Add GetKeys()/RemoveKeys methods #124
Labels
Feature
New feature that will be added to the project
Resolved: Completed
The issue has been resolved
Is your feature request related to a problem? Please describe.
I am porting a ReactJS website to Blazor and due to 'reasons' I store data with 'random' keys which I want to delete every x days. (this is vague I know). The easiest way is to compare all the keys in store with keys I 'allow' and then remove unwanted data by key.
Describe alternatives you've considered
I can fix this now by:
int Length();
-> foreach index ->string Key(int index);
-> and depending on an if call:void RemoveItem(string key);
So when I have 100 keys in store and I have to remove 50. I will have to make 1 + 100 + 50 = 151 calls to JS interop.
Describe the solution you'd like
If there were also
IEnumerable<string> GetKeys()
+void RemoveKeys(IEnumerable<string> keys)
Then I could achieve the same with just 2 calls. Which is nicer, more readable and faster.
Additional context
I describe it here as sync buth it would of cource also be nice in async.
FYI, code in my ReacttJS (TypeScript) app:
The text was updated successfully, but these errors were encountered: