/ src / modules / cmdpal / Microsoft.CmdPal.UI.ViewModels / FallbackSettings.cs
FallbackSettings.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.Serialization;
 6  
 7  namespace Microsoft.CmdPal.UI.ViewModels;
 8  
 9  public class FallbackSettings
10  {
11      public bool IsEnabled { get; set; } = true;
12  
13      public bool IncludeInGlobalResults { get; set; }
14  
15      public FallbackSettings()
16      {
17      }
18  
19      public FallbackSettings(bool isBuiltIn)
20      {
21          IncludeInGlobalResults = isBuiltIn;
22      }
23  
24      [JsonConstructor]
25      public FallbackSettings(bool isEnabled, bool includeInGlobalResults)
26      {
27          IsEnabled = isEnabled;
28          IncludeInGlobalResults = includeInGlobalResults;
29      }
30  }