PowerToys/src/settings-ui/Settings.UI.Library/BoolProperty.cs

31 lines
702 B
C#
Raw Normal View History

// Copyright (c) Microsoft Corporation
// 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;
2020-04-17 02:45:27 +08:00
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class BoolProperty
{
2020-04-17 02:45:27 +08:00
public BoolProperty()
{
Value = false;
2020-04-17 02:45:27 +08:00
}
public BoolProperty(bool value)
{
Value = value;
}
2020-04-17 02:45:27 +08:00
[JsonPropertyName("value")]
public bool Value { get; set; }
public override string ToString()
{
return JsonSerializer.Serialize(this);
}
}
}