+
Skip to content

[Feature Request]Add a GetAllLocalStorageKeys() method #256

Open
@SvdSinner

Description

@SvdSinner

Is your feature request related to a problem? Please describe.
The one glaring omission of Blazored.LocalStorage is that there is no way to see what keys are already in local storage. I cache recent result sets, and when I look for the result sets, I need to know if "ResultSet|-Name-" exists. (NOTE: For what I'm doing, more that one might be usable, and I need to know what the options are. I can't just try to get "ResultSet|-Name-" and handle if it is null.)

Describe the solution you'd like
Add a method to LocalStorageService called GetAllLocalStorageKeys (or whatever) that returns an array of string with all keys currently populated in LocalStorage. Note: In javascript, you get the data with "Object.keys(localStorage)"

Describe alternatives you've considered
I can write code to do this outside of your nuget package, but it seems silly to build another service just for this one function, especially since it is so easy to do inside of your nuget package

Additional context
How it is done in JavaScript

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestRequest to add a new featureTriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载