public static CoreResult[] Check(string image) { coreOptions.searchPath = new[] { new CorePathWithSubFolder(Paths.Sources, true), new CorePathWithSubFolder(image, false) }; coreOptions.Set(core, options.onePath); core.Clear(CoreDll.FileType.Result); core.Clear(CoreDll.FileType.Temporary); core.Load(CoreDll.FileType.ImageDataBase, coreOptions.GetImageDataBasePath(), false); core.Search(); core.ApplyToResult(CoreDll.GlobalActionType.SetGroup); core.ApplyToResult(CoreDll.GlobalActionType.SetHint); core.Save(CoreDll.FileType.ImageDataBase, coreOptions.GetImageDataBasePath()); core.Clear(CoreDll.FileType.ImageDataBase); core.SortResult((CoreDll.SortType)options.resultsOptions.sortTypeDefault, options.resultsOptions.increasingDefault); var count = core.GetResultSize(); if (count == 0) { return(new CoreResult[] { }); } var images = core.GetResult(0, count); return(images.Where(match => Path.GetFullPath(match.first.path) == image || Path.GetFullPath(match.second.path) == image).ToArray()); }