From a9695e3119cc89caaa848cd762de7e754034e9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BC=98=E9=9F=AC?= Date: Wed, 12 May 2021 03:10:03 +0800 Subject: [PATCH] fix some typo --- .../Storage/FlowLauncherJsonStorage.cs | 2 +- .../Storage/JsonStorage.cs | 14 +++++++------- .../Storage/PluginJsonStorage.cs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs index 03a0206bb..ec7a38804 100644 --- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs +++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs @@ -8,7 +8,7 @@ using Flow.Launcher.Infrastructure.UserSettings; namespace Flow.Launcher.Infrastructure.Storage { - public class FlowLauncherJsonStorage : JsonStrorage where T : new() + public class FlowLauncherJsonStorage : JsonStorage where T : new() { public FlowLauncherJsonStorage() { diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs index 833ec087d..43d19bea8 100644 --- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs +++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs @@ -9,7 +9,7 @@ namespace Flow.Launcher.Infrastructure.Storage /// /// Serialize object using json format. /// - public class JsonStrorage where T : new() + public class JsonStorage where T : new() { protected T _data; // need a new directory name @@ -23,10 +23,10 @@ namespace Flow.Launcher.Infrastructure.Storage { if (File.Exists(FilePath)) { - var searlized = File.ReadAllText(FilePath); - if (!string.IsNullOrWhiteSpace(searlized)) + var serialized = File.ReadAllText(FilePath); + if (!string.IsNullOrWhiteSpace(serialized)) { - Deserialize(searlized); + Deserialize(serialized); } else { @@ -40,16 +40,16 @@ namespace Flow.Launcher.Infrastructure.Storage return _data.NonNull(); } - private void Deserialize(string searlized) + private void Deserialize(string serialized) { try { - _data = JsonSerializer.Deserialize(searlized); + _data = JsonSerializer.Deserialize(serialized); } catch (JsonException e) { LoadDefault(); - Log.Exception($"|JsonStrorage.Deserialize|Deserialize error for json <{FilePath}>", e); + Log.Exception($"|JsonStorage.Deserialize|Deserialize error for json <{FilePath}>", e); } if (_data == null) diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs index ca7c454c4..fb45c5e3e 100644 --- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs +++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs @@ -3,11 +3,11 @@ using Flow.Launcher.Infrastructure.UserSettings; namespace Flow.Launcher.Infrastructure.Storage { - public class PluginJsonStorage :JsonStrorage where T : new() + public class PluginJsonStorage :JsonStorage where T : new() { public PluginJsonStorage() { - // C# releated, add python releated below + // C# related, add python related below var dataType = typeof(T); var assemblyName = typeof(T).Assembly.GetName().Name; DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName, Constant.Plugins, assemblyName);