mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
remove useless virtual method
This commit is contained in:
parent
1a08ba0b57
commit
d358a9d9fd
@ -30,7 +30,7 @@ namespace Wox.Infrastructure.Storage
|
||||
};
|
||||
}
|
||||
|
||||
public override T Load()
|
||||
public T Load()
|
||||
{
|
||||
if (File.Exists(FilePath))
|
||||
{
|
||||
@ -64,13 +64,13 @@ namespace Wox.Infrastructure.Storage
|
||||
}
|
||||
}
|
||||
|
||||
public override void LoadDefault()
|
||||
public void LoadDefault()
|
||||
{
|
||||
Data = JsonConvert.DeserializeObject<T>("{}", _serializerSettings);
|
||||
Save();
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
public void Save()
|
||||
{
|
||||
string serialized = JsonConvert.SerializeObject(Data, Formatting.Indented);
|
||||
File.WriteAllText(FilePath, serialized);
|
||||
|
@ -13,21 +13,6 @@ namespace Wox.Infrastructure.Storage
|
||||
public string DirectoryPath { get; set; }
|
||||
public string DirectoryName { get; set; }
|
||||
|
||||
public virtual T Load()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual void Save()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual void LoadDefault()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected Storage()
|
||||
{
|
||||
DataType = typeof (T);
|
||||
|
Loading…
Reference in New Issue
Block a user