@@ -25,6 +25,8 @@ public class Settings
25
25
26
26
public string FileContentSearchActionKeyword { get ; set ; } = Constants . DefaultContentSearchActionKeyword ;
27
27
28
+ public bool FileContentSearchKeywordEnabled { get ; set ; } = true ;
29
+
28
30
public string PathSearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
29
31
30
32
public bool PathSearchKeywordEnabled { get ; set ; }
@@ -48,7 +50,8 @@ internal enum ActionKeyword
48
50
ActionKeyword . SearchActionKeyword => SearchActionKeyword ,
49
51
ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword ,
50
52
ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword ,
51
- ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword
53
+ ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword ,
54
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found" )
52
55
} ;
53
56
54
57
internal void SetActionKeyword ( ActionKeyword actionKeyword , string keyword ) => _ = actionKeyword switch
@@ -57,23 +60,25 @@ internal enum ActionKeyword
57
60
ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword = keyword ,
58
61
ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword = keyword ,
59
62
ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword = keyword ,
60
- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
63
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found " )
61
64
} ;
62
65
63
- internal bool ? GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
66
+ internal bool GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
64
67
{
65
68
ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled ,
66
69
ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled ,
67
70
ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled ,
68
- _ => null
71
+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled ,
72
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
69
73
} ;
70
74
71
75
internal void SetActionKeywordEnabled ( ActionKeyword actionKeyword , bool enable ) => _ = actionKeyword switch
72
76
{
73
77
ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled = enable ,
74
78
ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled = enable ,
75
79
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" )
77
82
} ;
78
83
}
79
84
}
0 commit comments