8
8
using System . Collections . Generic ;
9
9
using System . Collections . ObjectModel ;
10
10
using System . Diagnostics ;
11
+ using System . Diagnostics . CodeAnalysis ;
11
12
using System . IO ;
12
13
using System . Linq ;
13
14
using System . Windows ;
@@ -82,15 +83,21 @@ public EnumBindingModel<Settings.PathEnumerationEngineOption> SelectedPathEnumer
82
83
}
83
84
}
84
85
86
+ [ MemberNotNull ( nameof ( IndexSearchEngines ) ,
87
+ nameof ( ContentIndexSearchEngines ) ,
88
+ nameof ( PathEnumerationEngines ) ,
89
+ nameof ( _selectedIndexSearchEngine ) ,
90
+ nameof ( _selectedContentSearchEngine ) ,
91
+ nameof ( _selectedPathEnumerationEngine ) ) ]
85
92
private void InitializeEngineSelection ( )
86
93
{
87
94
IndexSearchEngines = EnumBindingModel < Settings . IndexSearchEngineOption > . CreateList ( ) ;
88
95
ContentIndexSearchEngines = EnumBindingModel < Settings . ContentIndexSearchEngineOption > . CreateList ( ) ;
89
96
PathEnumerationEngines = EnumBindingModel < Settings . PathEnumerationEngineOption > . CreateList ( ) ;
90
97
91
- SelectedIndexSearchEngine = IndexSearchEngines . First ( x => x . Value == Settings . IndexSearchEngine ) ;
92
- SelectedContentSearchEngine = ContentIndexSearchEngines . First ( x => x . Value == Settings . ContentSearchEngine ) ;
93
- SelectedPathEnumerationEngine = PathEnumerationEngines . First ( x => x . Value == Settings . PathEnumerationEngine ) ;
98
+ _selectedIndexSearchEngine = IndexSearchEngines . First ( x => x . Value == Settings . IndexSearchEngine ) ;
99
+ _selectedContentSearchEngine = ContentIndexSearchEngines . First ( x => x . Value == Settings . ContentSearchEngine ) ;
100
+ _selectedPathEnumerationEngine = PathEnumerationEngines . First ( x => x . Value == Settings . PathEnumerationEngine ) ;
94
101
}
95
102
96
103
#endregion
@@ -99,6 +106,7 @@ private void InitializeEngineSelection()
99
106
100
107
#region ActionKeyword
101
108
109
+ [ MemberNotNull ( nameof ( ActionKeywordsModels ) ) ]
102
110
private void InitializeActionKeywordModels ( )
103
111
{
104
112
ActionKeywordsModels = new List < ActionKeywordModel >
@@ -307,7 +315,7 @@ internal static void OpenWindowsIndexingOptions()
307
315
Process . Start ( psi ) ;
308
316
}
309
317
310
- private ICommand _openEditorPathCommand ;
318
+ private ICommand ? _openEditorPathCommand ;
311
319
312
320
public ICommand OpenEditorPath => _openEditorPathCommand ??= new RelayCommand ( _ =>
313
321
{
@@ -318,7 +326,7 @@ internal static void OpenWindowsIndexingOptions()
318
326
EditorPath = path ;
319
327
} ) ;
320
328
321
- private ICommand _openShellPathCommand ;
329
+ private ICommand ? _openShellPathCommand ;
322
330
323
331
public ICommand OpenShellPath => _openShellPathCommand ??= new RelayCommand ( _ =>
324
332
{
0 commit comments