@@ -245,7 +245,7 @@ public ImageResult[] FindDirectResults(int count = 5)
245245
246246 var best = FindBestResults ( ) . ToList ( ) ;
247247
248- Debug . WriteLine ( $ "Found { best . Count } best results") ;
248+ Debug . WriteLine ( $ "{ nameof ( SearchClient ) } : Found { best . Count } best results", C_DEBUG ) ;
249249
250250 var images = new ConcurrentBag < ImageResult > ( ) ;
251251
@@ -262,15 +262,15 @@ public ImageResult[] FindDirectResults(int count = 5)
262262 continue ;
263263 }
264264
265- Debug . WriteLine ( $ "{ nameof ( FindDirectResult ) } : Adding { item . Direct } ") ;
265+ // Debug.WriteLine($"{nameof(FindDirectResult)}: Adding {item.Direct}");
266266
267267 images . Add ( item ) ;
268268
269-
269+
270270 } while ( ++ i != best . Count && i < count /*!images.Any(x=>x.Direct!=null)*/ ) ;
271271
272272
273- Debug . WriteLine ( $ "Found { images . Count } direct results") ;
273+ Debug . WriteLine ( $ "{ nameof ( SearchClient ) } : Found { images . Count } direct results", C_DEBUG ) ;
274274
275275 return images . OrderByDescending ( r => r . Similarity )
276276 . ToArray ( ) ;
@@ -291,16 +291,11 @@ public ImageResult[] FindBestResults()
291291 var x = r . OtherResults ;
292292 x . Insert ( 0 , r . PrimaryResult ) ;
293293 return x ;
294- } ) ;
295-
296- //==================================================================//
297-
298-
299- best = best
300- . AsParallel ( )
301- . OrderByDescending ( r => r . Similarity )
302- . ThenByDescending ( r => r . PixelResolution )
303- . ThenByDescending ( r => r . DetailScore ) ;
294+ } )
295+ . AsParallel ( )
296+ . OrderByDescending ( r => r . Similarity )
297+ . ThenByDescending ( r => r . PixelResolution )
298+ . ThenByDescending ( r => r . DetailScore ) ;
304299
305300
306301 return best . ToArray ( ) ;
0 commit comments