Skip to content

Commit a9695e3

Browse files
committed
fix some typo
1 parent 25f6e66 commit a9695e3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Flow.Launcher.Infrastructure.Storage
1010
{
11-
public class FlowLauncherJsonStorage<T> : JsonStrorage<T> where T : new()
11+
public class FlowLauncherJsonStorage<T> : JsonStorage<T> where T : new()
1212
{
1313
public FlowLauncherJsonStorage()
1414
{

Flow.Launcher.Infrastructure/Storage/JsonStorage.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Flow.Launcher.Infrastructure.Storage
99
/// <summary>
1010
/// Serialize object using json format.
1111
/// </summary>
12-
public class JsonStrorage<T> where T : new()
12+
public class JsonStorage<T> where T : new()
1313
{
1414
protected T _data;
1515
// need a new directory name
@@ -23,10 +23,10 @@ public T Load()
2323
{
2424
if (File.Exists(FilePath))
2525
{
26-
var searlized = File.ReadAllText(FilePath);
27-
if (!string.IsNullOrWhiteSpace(searlized))
26+
var serialized = File.ReadAllText(FilePath);
27+
if (!string.IsNullOrWhiteSpace(serialized))
2828
{
29-
Deserialize(searlized);
29+
Deserialize(serialized);
3030
}
3131
else
3232
{
@@ -40,16 +40,16 @@ public T Load()
4040
return _data.NonNull();
4141
}
4242

43-
private void Deserialize(string searlized)
43+
private void Deserialize(string serialized)
4444
{
4545
try
4646
{
47-
_data = JsonSerializer.Deserialize<T>(searlized);
47+
_data = JsonSerializer.Deserialize<T>(serialized);
4848
}
4949
catch (JsonException e)
5050
{
5151
LoadDefault();
52-
Log.Exception($"|JsonStrorage.Deserialize|Deserialize error for json <{FilePath}>", e);
52+
Log.Exception($"|JsonStorage.Deserialize|Deserialize error for json <{FilePath}>", e);
5353
}
5454

5555
if (_data == null)

Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
namespace Flow.Launcher.Infrastructure.Storage
55
{
6-
public class PluginJsonStorage<T> :JsonStrorage<T> where T : new()
6+
public class PluginJsonStorage<T> :JsonStorage<T> where T : new()
77
{
88
public PluginJsonStorage()
99
{
10-
// C# releated, add python releated below
10+
// C# related, add python related below
1111
var dataType = typeof(T);
1212
var assemblyName = typeof(T).Assembly.GetName().Name;
1313
DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName, Constant.Plugins, assemblyName);

0 commit comments

Comments
 (0)