次の方法で共有


ProtectedLocalStorage クラス

定義

ブラウザーの 'localStorage' コレクションにデータを格納および取得するためのメカニズムを提供します。

このデータは、現在のユーザーのブラウザーにスコープが設定され、すべてのタブで共有されます。 データはブラウザーの再起動間で保持されます。

https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage をご覧ください。

public ref class ProtectedLocalStorage sealed : Microsoft::AspNetCore::Components::Server::ProtectedBrowserStorage::ProtectedBrowserStorage
public sealed class ProtectedLocalStorage : Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage
type ProtectedLocalStorage = class
    inherit ProtectedBrowserStorage
Public NotInheritable Class ProtectedLocalStorage
Inherits ProtectedBrowserStorage
継承
ProtectedLocalStorage

コンストラクター

ProtectedLocalStorage(IJSRuntime, IDataProtectionProvider)

のインスタンス ProtectedLocalStorageを構築します。

メソッド

DeleteAsync(String)

指定したキーに格納されているすべてのデータを非同期的に削除します。

(継承元 ProtectedBrowserStorage)
GetAsync<TValue>(String)

指定したデータを非同期的に取得します。

このオーバーロードではデータ保護の目的が指定されていないので、目的は および ストア名から key 派生します。 これは、キーがコンパイル時に既知の固定セットから取得される場合に使用する適切な既定の目的です。

(継承元 ProtectedBrowserStorage)
GetAsync<TValue>(String, String)

指定したデータを非同期的に取得します。

(継承元 ProtectedBrowserStorage)
SetAsync(String, Object)

指定したデータを非同期に格納します。

このオーバーロードではデータ保護の目的が指定されていないので、目的は および ストア名から key 派生します。 これは、キーがコンパイル時に既知の固定セットから取得される場合に使用する適切な既定の目的です。

(継承元 ProtectedBrowserStorage)
SetAsync(String, String, Object)

指定されたデータを非同期に格納します。

(継承元 ProtectedBrowserStorage)

適用対象