11using Flow . Launcher . Plugin . Explorer . Search ;
22using Flow . Launcher . Plugin . Explorer . Search . QuickAccessLinks ;
3- using Microsoft . AspNetCore . DataProtection . AuthenticatedEncryption ;
43using System ;
54using System . Collections . Generic ;
6- using System . IO ;
75
86namespace Flow . Launcher . Plugin . Explorer
97{
@@ -25,13 +23,15 @@ public class Settings
2523
2624 public string FileContentSearchActionKeyword { get ; set ; } = Constants . DefaultContentSearchActionKeyword ;
2725
26+ public bool FileContentSearchKeywordEnabled { get ; set ; } = true ;
27+
2828 public string PathSearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
2929
3030 public bool PathSearchKeywordEnabled { get ; set ; }
3131
3232 public string IndexSearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
3333
34- public bool IndexOnlySearchKeywordEnabled { get ; set ; }
34+ public bool IndexSearchKeywordEnabled { get ; set ; }
3535
3636 public bool WarnWindowsSearchServiceOff { get ; set ; } = true ;
3737
@@ -48,7 +48,8 @@ internal enum ActionKeyword
4848 ActionKeyword . SearchActionKeyword => SearchActionKeyword ,
4949 ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword ,
5050 ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword ,
51- ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword
51+ ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword ,
52+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found" )
5253 } ;
5354
5455 internal void SetActionKeyword ( ActionKeyword actionKeyword , string keyword ) => _ = actionKeyword switch
@@ -57,23 +58,25 @@ internal enum ActionKeyword
5758 ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword = keyword ,
5859 ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword = keyword ,
5960 ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword = keyword ,
60- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
61+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found " )
6162 } ;
6263
63- internal bool ? GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
64+ internal bool GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
6465 {
6566 ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled ,
6667 ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled ,
67- ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled ,
68- _ => null
68+ ActionKeyword . IndexSearchActionKeyword => IndexSearchKeywordEnabled ,
69+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled ,
70+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
6971 } ;
7072
7173 internal void SetActionKeywordEnabled ( ActionKeyword actionKeyword , bool enable ) => _ = actionKeyword switch
7274 {
7375 ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled = enable ,
7476 ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled = enable ,
75- ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled = enable ,
76- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
77+ ActionKeyword . IndexSearchActionKeyword => IndexSearchKeywordEnabled = enable ,
78+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled = enable ,
79+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
7780 } ;
7881 }
7982}
0 commit comments