mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using System.IO;
|
|
using System.Reflection;
|
|
using Newtonsoft.Json;
|
|
using Wox.Infrastructure.Storage;
|
|
|
|
namespace Wox.UpdateFeedGenerator
|
|
{
|
|
public class ConfigStorage : JsonStrorage<ConfigStorage>
|
|
{
|
|
[JsonProperty]
|
|
public string OutputDirectory { get; set; }
|
|
|
|
[JsonProperty]
|
|
public string SourceDirectory { get; set; }
|
|
|
|
[JsonProperty]
|
|
public string BaseURL { get; set; }
|
|
|
|
[JsonProperty]
|
|
public string FeedXMLName { get; set; }
|
|
|
|
[JsonProperty]
|
|
public bool CheckVersion { get; set; }
|
|
|
|
[JsonProperty]
|
|
public bool CheckSize { get; set; }
|
|
|
|
[JsonProperty]
|
|
public bool CheckDate { get; set; }
|
|
|
|
[JsonProperty]
|
|
public bool CheckHash { get; set; }
|
|
|
|
protected override void OnAfterLoad(ConfigStorage config)
|
|
{
|
|
if (string.IsNullOrEmpty(config.OutputDirectory))
|
|
{
|
|
config.OutputDirectory = @"Update";
|
|
Instance.Save();
|
|
}
|
|
}
|
|
|
|
protected override string FileName { get; } = "config";
|
|
}
|
|
}
|