@@ -25,6 +25,8 @@ public class Settings
2525
2626 public string FileContentSearchActionKeyword { get ; set ; } = Constants . DefaultContentSearchActionKeyword ;
2727
28+ public bool FileContentSearchKeywordEnabled { get ; set ; } = true ;
29+
2830 public string PathSearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
2931
3032 public bool PathSearchKeywordEnabled { get ; set ; }
@@ -48,7 +50,8 @@ internal enum ActionKeyword
4850 ActionKeyword . SearchActionKeyword => SearchActionKeyword ,
4951 ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword ,
5052 ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword ,
51- ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword
53+ ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword ,
54+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found" )
5255 } ;
5356
5457 internal void SetActionKeyword ( ActionKeyword actionKeyword , string keyword ) => _ = actionKeyword switch
@@ -57,23 +60,25 @@ internal enum ActionKeyword
5760 ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword = keyword ,
5861 ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword = keyword ,
5962 ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword = keyword ,
60- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
63+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found " )
6164 } ;
6265
63- internal bool ? GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
66+ internal bool GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
6467 {
6568 ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled ,
6669 ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled ,
6770 ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled ,
68- _ => null
71+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled ,
72+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
6973 } ;
7074
7175 internal void SetActionKeywordEnabled ( ActionKeyword actionKeyword , bool enable ) => _ = actionKeyword switch
7276 {
7377 ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled = enable ,
7478 ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled = enable ,
7579 ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled = enable ,
76- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
80+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled = enable ,
81+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
7782 } ;
7883 }
7984}
0 commit comments