Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Blazored.SessionStorage/ISessionStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ public interface ISessionStorageService

Task<string> KeyAsync(int index);

/// <summary>
/// Checks if the key exists in Session Storage but does not check the value.
/// </summary>
/// <param name="key">name of the key</param>
/// <returns>True if the key exist, false otherwise</returns>
Task<bool> ContainKeyAsync(string key);

Task<int> LengthAsync();

Task RemoveItemAsync(string key);

Task SetItemAsync<T>(string key, T data);

event EventHandler<ChangingEventArgs> Changing;

event EventHandler<ChangedEventArgs> Changed;
}
}
}
8 changes: 8 additions & 0 deletions src/Blazored.SessionStorage/ISyncSessionStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ public interface ISyncSessionStorageService

string Key(int index);

/// <summary>
/// Checks if the key exists in Session Storage but does not check the value.
/// </summary>
/// <param name="key">name of the key</param>
/// <returns>True if the key exist, false otherwise</returns>
bool ContainKey(string key);

int Length();

void RemoveItem(string key);

void SetItem<T>(string key, T data);

event EventHandler<ChangingEventArgs> Changing;

event EventHandler<ChangedEventArgs> Changed;
}
}
Loading