RemapKeysDataModel.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Collections.Generic; 6 using System.Text.Json; 7 using System.Text.Json.Serialization; 8 9 namespace Microsoft.PowerToys.Settings.UI.Library 10 { 11 public class RemapKeysDataModel 12 { 13 // Suppressing this warning because removing the setter breaks 14 // deserialization with System.Text.Json. This affects the UI display. 15 // See: https://github.com/dotnet/runtime/issues/30258 16 [JsonPropertyName("inProcess")] 17 public List<KeysDataModel> InProcessRemapKeys { get; set; } 18 19 public RemapKeysDataModel() 20 { 21 InProcessRemapKeys = new List<KeysDataModel>(); 22 } 23 24 public string ToJsonString() 25 { 26 return JsonSerializer.Serialize(this); 27 } 28 } 29 }