@@ -82,14 +82,17 @@ private IAsyncEnumerable<SearchResult> WindowsIndexTopLevelFolderSearchAsync(
82
82
return HandledEngineNotAvailableExceptionAsync ( ) ;
83
83
}
84
84
}
85
+
85
86
public IAsyncEnumerable < SearchResult > SearchAsync ( string search , CancellationToken token )
86
87
{
87
88
return WindowsIndexFilesAndFoldersSearchAsync ( search , token : token ) ;
88
89
}
90
+
89
91
public IAsyncEnumerable < SearchResult > ContentSearchAsync ( string plainSearch , string contentSearch , CancellationToken token )
90
92
{
91
93
return WindowsIndexFileContentSearchAsync ( contentSearch , token ) ;
92
94
}
95
+
93
96
public IAsyncEnumerable < SearchResult > EnumerateAsync ( string path , string search , bool recursive , CancellationToken token )
94
97
{
95
98
return WindowsIndexTopLevelFolderSearchAsync ( search , path , recursive , token ) ;
@@ -100,19 +103,17 @@ private IAsyncEnumerable<SearchResult> HandledEngineNotAvailableExceptionAsync()
100
103
if ( ! Settings . WarnWindowsSearchServiceOff )
101
104
return AsyncEnumerable . Empty < SearchResult > ( ) ;
102
105
103
- var api = Main . Context . API ;
104
-
105
106
throw new EngineNotAvailableException (
106
107
"Windows Index" ,
107
- api . GetTranslation ( "plugin_explorer_windowsSearchServiceFix" ) ,
108
- api . GetTranslation ( "plugin_explorer_windowsSearchServiceNotRunning" ) ,
108
+ Main . Context . API . GetTranslation ( "plugin_explorer_windowsSearchServiceFix" ) ,
109
+ Main . Context . API . GetTranslation ( "plugin_explorer_windowsSearchServiceNotRunning" ) ,
109
110
Constants . WindowsIndexErrorImagePath ,
110
111
c =>
111
112
{
112
113
Settings . WarnWindowsSearchServiceOff = false ;
113
114
114
115
// Clears the warning message so user is not mistaken that it has not worked
115
- api . ChangeQuery ( string . Empty ) ;
116
+ Main . Context . API . ChangeQuery ( string . Empty ) ;
116
117
117
118
return ValueTask . FromResult ( false ) ;
118
119
} ) ;
0 commit comments