WindowsSetting.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  
 7  namespace Microsoft.CmdPal.Ext.WindowsSettings.Classes;
 8  
 9  /// <summary>
10  /// A windows setting
11  /// </summary>
12  internal sealed class WindowsSetting
13  {
14      /// <summary>
15      /// Initializes a new instance of the <see cref="WindowsSetting"/> class.
16      /// </summary>
17      public WindowsSetting()
18      {
19          Name = string.Empty;
20          Command = string.Empty;
21          Type = string.Empty;
22          AppHomepageScore = 0;
23      }
24  
25      /// <summary>
26      /// Gets or sets the name of this setting.
27      /// </summary>
28      public string Name { get; set; }
29  
30      /// <summary>
31      /// Gets or sets the areas of this setting. The order is fixed to the order in json.
32      /// </summary>
33  #pragma warning disable CS8632
34      public IList<string>? Areas { get; set; }
35  
36      /// <summary>
37      /// Gets or sets the command of this setting.
38      /// </summary>
39      public string Command { get; set; }
40  
41      /// <summary>
42      /// Gets or sets the type of the windows setting.
43      /// </summary>
44      public string Type { get; set; }
45  
46      /// <summary>
47      /// Gets or sets the alternative names of this setting.
48      /// </summary>
49      public IEnumerable<string>? AltNames { get; set; }
50  
51      /// <summary>
52      /// Gets or sets a additional note of this settings.
53      /// <para>(e.g. why is not supported on your system)</para>
54      /// </summary>
55      public string? Note { get; set; }
56  
57      /// <summary>
58      /// Gets or sets the minimum need Windows build for this setting.
59      /// </summary>
60      public uint? IntroducedInBuild { get; set; }
61  
62      /// <summary>
63      /// Gets or sets the Windows build since this settings is not longer present.
64      /// </summary>
65      public uint? DeprecatedInBuild { get; set; }
66  
67      /// <summary>
68      /// Gets or sets the score for entries if they are a settings app (homepage). If the score is higher 0 they are shown on empty query.
69      /// </summary>
70      public int AppHomepageScore { get; set; }
71  
72      /// <summary>
73      /// Gets or sets the value with the generated area path as string.
74      /// This Property IS NOT PART OF THE DATA IN "WindowsSettings.json".
75      /// This property will be filled on runtime by "WindowsSettingsPathHelper".
76      /// </summary>
77      public string? JoinedAreaPath { get; set; }
78  
79      /// <summary>
80      /// Gets or sets the value with the generated full settings path (App and areas) as string.
81      /// This Property IS NOT PART OF THE DATA IN "WindowsSettings.json".
82      /// This property will be filled on runtime by "WindowsSettingsPathHelper".
83      /// </summary>
84      public string? JoinedFullSettingsPath { get; set; }
85  #pragma warning restore CS8632
86  }