renamed for Defualt match option

This commit is contained in:
Amir Tepper 2019-10-20 15:45:06 +03:00
parent aefc90dc19
commit a3ba2276e2
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ namespace Wox.Infrastructure
public static FuzzyMatcher Create(string query) public static FuzzyMatcher Create(string query)
{ {
return new FuzzyMatcher(query, StringMatcher.EmptyMatchOption); return new FuzzyMatcher(query, StringMatcher.DefaultMatchOption);
} }
public static FuzzyMatcher Create(string query, MatchOption opt) public static FuzzyMatcher Create(string query, MatchOption opt)

View File

@ -8,7 +8,7 @@ namespace Wox.Infrastructure
{ {
public static class StringMatcher public static class StringMatcher
{ {
public static MatchOption EmptyMatchOption = new MatchOption(); public static MatchOption DefaultMatchOption = new MatchOption();
public static string UserSettingSearchPrecision { get; set; } public static string UserSettingSearchPrecision { get; set; }
@ -17,7 +17,7 @@ namespace Wox.Infrastructure
{ {
if (!string.IsNullOrEmpty(source) && !string.IsNullOrEmpty(target)) if (!string.IsNullOrEmpty(source) && !string.IsNullOrEmpty(target))
{ {
return FuzzySearch(target, source, EmptyMatchOption).Score; return FuzzySearch(target, source, DefaultMatchOption).Score;
} }
else else
{ {
@ -28,12 +28,12 @@ namespace Wox.Infrastructure
[Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")] [Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
public static bool IsMatch(string source, string target) public static bool IsMatch(string source, string target)
{ {
return FuzzySearch(target, source, EmptyMatchOption).Score > 0; return FuzzySearch(target, source, DefaultMatchOption).Score > 0;
} }
public static MatchResult FuzzySearch(string query, string stringToCompare) public static MatchResult FuzzySearch(string query, string stringToCompare)
{ {
return FuzzySearch(query, stringToCompare, EmptyMatchOption); return FuzzySearch(query, stringToCompare, DefaultMatchOption);
} }
/// <summary> /// <summary>