mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 12:09:18 +08:00
8d10c9aa41
1. part of #389 2. huge refactoring
21 lines
635 B
C#
21 lines
635 B
C#
using System.IO;
|
|
|
|
namespace Wox.Infrastructure.Storage
|
|
{
|
|
public class PluginSettingsStorage<T> :JsonStrorage<T> where T : new()
|
|
{
|
|
public PluginSettingsStorage()
|
|
{
|
|
var pluginDirectoryName = "Plugins";
|
|
|
|
// C# releated, add python releated below
|
|
var type = typeof (T);
|
|
FileName = type.Name;
|
|
var assemblyName = type.Assembly.GetName().Name;
|
|
DirectoryPath = Path.Combine(WoxDirectroy.Executable, DirectoryName, pluginDirectoryName, assemblyName);
|
|
|
|
FilePath = Path.Combine(DirectoryPath, FileName + FileSuffix);
|
|
}
|
|
}
|
|
}
|