PowerToys/src/modules/launcher/Wox.Infrastructure/FuzzyMatcher.cs
Clint Rutkas 92a2b83bc8
smaller stylecop fixes in Wox.Core and Wox.Infra (#5671)
* Headers
unneeded usings
files need blank line at bottom
Fixed double returns
Returns after braces

* commenting out stylecop
2020-08-05 14:06:42 -07:00

37 lines
1.0 KiB
C#

// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Wox.Infrastructure
{
[Obsolete("This class is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
public class FuzzyMatcher
{
private string query;
private MatchOption opt;
private FuzzyMatcher(string query, MatchOption opt)
{
this.query = query.Trim();
this.opt = opt;
}
public static FuzzyMatcher Create(string query)
{
return new FuzzyMatcher(query, new MatchOption());
}
public static FuzzyMatcher Create(string query, MatchOption opt)
{
return new FuzzyMatcher(query, opt);
}
public MatchResult Evaluate(string str)
{
return StringMatcher.Instance.FuzzyMatch(query, str, opt);
}
}
}