mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
renamed for Defualt match option
This commit is contained in:
parent
aefc90dc19
commit
a3ba2276e2
@ -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)
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user