mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-09 04:57:56 +08:00
84169cce10
* spelling: arguments * spelling: config * spelling: deactivated * spelling: exception * spelling: folder * spelling: initialize * spelling: makesure * spelling: response * spelling: storage * spelling: visibility * spelling: serialized * spelling: zipped
19 lines
606 B
C#
19 lines
606 B
C#
using System.IO;
|
|
|
|
namespace Wox.Infrastructure.Storage
|
|
{
|
|
public class PluginJsonStorage<T> :JsonStorage<T> where T : new()
|
|
{
|
|
public PluginJsonStorage()
|
|
{
|
|
// C# related, add python related below
|
|
var dataType = typeof(T);
|
|
var assemblyName = typeof(T).Assembly.GetName().Name;
|
|
DirectoryPath = Path.Combine(Constant.DataDirectory, DirectoryName, Constant.Plugins, assemblyName);
|
|
Helper.ValidateDirectory(DirectoryPath);
|
|
|
|
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
|
|
}
|
|
}
|
|
}
|