diff --git a/src/Blazored.LocalStorage/LocalStorageService.cs b/src/Blazored.LocalStorage/LocalStorageService.cs index c61cb35..900238e 100644 --- a/src/Blazored.LocalStorage/LocalStorageService.cs +++ b/src/Blazored.LocalStorage/LocalStorageService.cs @@ -23,7 +23,7 @@ public async ValueTask SetItemAsync(string key, T data, CancellationToken can if (string.IsNullOrWhiteSpace(key)) throw new ArgumentNullException(nameof(key)); - var e = await RaiseOnChangingAsync(key, data).ConfigureAwait(false); + var e = await RaiseOnChangingAsync(key, data).ConfigureAwait(false); if (e.Cancel) return; @@ -42,7 +42,7 @@ public async ValueTask SetItemAsStringAsync(string key, string data, Cancellatio if (data is null) throw new ArgumentNullException(nameof(data)); - var e = await RaiseOnChangingAsync(key, data).ConfigureAwait(false); + var e = await RaiseOnChangingAsync(key, data).ConfigureAwait(false); if (e.Cancel) return; @@ -118,7 +118,7 @@ public void SetItem(string key, T data) if (string.IsNullOrWhiteSpace(key)) throw new ArgumentNullException(nameof(key)); - var e = RaiseOnChangingSync(key, data); + var e = RaiseOnChangingSync(key, data); if (e.Cancel) return; @@ -136,7 +136,7 @@ public void SetItemAsString(string key, string data) ArgumentNullException.ThrowIfNull(data); - var e = RaiseOnChangingSync(key, data); + var e = RaiseOnChangingSync(key, data); if (e.Cancel) return; @@ -208,12 +208,12 @@ public bool ContainKey(string key) => _storageProvider.ContainKey(key); public event EventHandler? Changing; - private async Task RaiseOnChangingAsync(string key, object? data) + private async Task RaiseOnChangingAsync(string key, object? data) { var e = new ChangingEventArgs { Key = key, - OldValue = await GetItemInternalAsync(key).ConfigureAwait(false), + OldValue = await GetItemInternalAsync(key).ConfigureAwait(false), NewValue = data }; @@ -222,12 +222,12 @@ private async Task RaiseOnChangingAsync(string key, object? d return e; } - private ChangingEventArgs RaiseOnChangingSync(string key, object? data) + private ChangingEventArgs RaiseOnChangingSync(string key, object? data) { var e = new ChangingEventArgs { Key = key, - OldValue = GetItemInternal(key), + OldValue = GetItemInternal(key), NewValue = data }; @@ -255,7 +255,7 @@ private ChangingEventArgs RaiseOnChangingSync(string key, object? data) } } - private object? GetItemInternal(string key) + private object? GetItemInternal(string key) { if (string.IsNullOrEmpty(key)) throw new ArgumentNullException(nameof(key)); @@ -267,7 +267,7 @@ private ChangingEventArgs RaiseOnChangingSync(string key, object? data) try { - return _serializer.Deserialize(serialisedData); + return _serializer.Deserialize(serialisedData); } catch (JsonException) { diff --git a/tests/Blazored.LocalStorage.Tests/Blazored.LocalStorage.Tests.csproj b/tests/Blazored.LocalStorage.Tests/Blazored.LocalStorage.Tests.csproj index 2345c02..b69f4d5 100644 --- a/tests/Blazored.LocalStorage.Tests/Blazored.LocalStorage.Tests.csproj +++ b/tests/Blazored.LocalStorage.Tests/Blazored.LocalStorage.Tests.csproj @@ -14,7 +14,7 @@ - + all