/ src / settings-ui / Settings.UI.Library / FileLocksmithLocalProperties.cs
FileLocksmithLocalProperties.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.Text.Json;
 6  using System.Text.Json.Serialization;
 7  
 8  using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
 9  
10  namespace Microsoft.PowerToys.Settings.UI.Library
11  {
12      public class FileLocksmithLocalProperties : ISettingsConfig
13      {
14          public FileLocksmithLocalProperties()
15          {
16              ExtendedContextMenuOnly = false;
17          }
18  
19          [JsonPropertyName("showInExtendedContextMenu")]
20          public bool ExtendedContextMenuOnly { get; set; }
21  
22          public string ToJsonString()
23          {
24              return JsonSerializer.Serialize(this, SettingsSerializationContext.Default.FileLocksmithLocalProperties);
25          }
26  
27          // This function is required to implement the ISettingsConfig interface and obtain the settings configurations.
28          public string GetModuleName()
29          {
30              string moduleName = FileLocksmithSettings.ModuleName;
31              return moduleName;
32          }
33  
34          // This can be utilized in the future if the settings.json file is to be modified/deleted.
35          public bool UpgradeSettingsConfiguration()
36          {
37              return false;
38          }
39      }
40  }