mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
PowerLauncherSettings unit tests (#2276)
This commit is contained in:
committed by
GitHub
parent
ca7b6f139f
commit
7ec8d02c1f
@@ -2,10 +2,14 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class PowerLauncherSettings : BasePTModuleSettings
|
||||
{
|
||||
public const string POWERTOYNAME = "PowerLauncher";
|
||||
|
||||
public PowerLauncherProperties properties { get; set; }
|
||||
|
||||
public PowerLauncherSettings()
|
||||
@@ -14,5 +18,16 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
version = "1";
|
||||
name = "_unset_";
|
||||
}
|
||||
|
||||
public virtual void Save()
|
||||
{
|
||||
// Save settings to file
|
||||
var options = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true,
|
||||
};
|
||||
|
||||
SettingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), POWERTOYNAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user