2016-04-21 08:53:21 +08:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace Wox.Infrastructure.Storage
|
|
|
|
|
{
|
2016-04-27 05:45:31 +08:00
|
|
|
|
public class PluginJsonStorage<T> :JsonStrorage<T> where T : new()
|
2016-04-21 08:53:21 +08:00
|
|
|
|
{
|
2016-04-27 05:45:31 +08:00
|
|
|
|
public PluginJsonStorage()
|
2016-04-21 08:53:21 +08:00
|
|
|
|
{
|
2016-05-04 09:26:19 +08:00
|
|
|
|
DirectoryName = Wox.Plugins;
|
2016-04-27 09:15:53 +08:00
|
|
|
|
|
2016-04-21 08:53:21 +08:00
|
|
|
|
// C# releated, add python releated below
|
2016-04-27 09:15:53 +08:00
|
|
|
|
var assemblyName = DataType.Assembly.GetName().Name;
|
|
|
|
|
DirectoryPath = Path.Combine(DirectoryPath, DirectoryName, assemblyName);
|
2016-04-21 08:53:21 +08:00
|
|
|
|
FilePath = Path.Combine(DirectoryPath, FileName + FileSuffix);
|
2016-04-27 09:15:53 +08:00
|
|
|
|
|
|
|
|
|
ValidateDirectory();
|
2016-04-21 08:53:21 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|