mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
for unit tetsing
This commit is contained in:
parent
a89b2ca450
commit
e1f2bc0a19
2 changed files with 14 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ namespace Wox.Core.Plugin
|
||||||
var rawQuery = string.Join(Query.TermSeperater, terms);
|
var rawQuery = string.Join(Query.TermSeperater, terms);
|
||||||
var actionKeyword = string.Empty;
|
var actionKeyword = string.Empty;
|
||||||
var search = rawQuery;
|
var search = rawQuery;
|
||||||
List<string> actionParameters = terms.ToList();
|
var actionParameters = terms.ToList();
|
||||||
if (terms.Length == 0) return null;
|
if (terms.Length == 0) return null;
|
||||||
if (NonGlobalPlugins.ContainsKey(terms[0]) &&
|
if (NonGlobalPlugins.ContainsKey(terms[0]) &&
|
||||||
!Settings.Plugins[NonGlobalPlugins[terms[0]].Metadata.ID].Disabled)
|
!Settings.Plugins[NonGlobalPlugins[terms[0]].Metadata.ID].Disabled)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,19 @@ namespace Wox.Plugin
|
||||||
{
|
{
|
||||||
public class Query
|
public class Query
|
||||||
{
|
{
|
||||||
|
internal Query() { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// to allow unit tests for plug ins
|
||||||
|
/// </summary>
|
||||||
|
public Query(string rawQuery, string search, string[] terms, string actionKeyword = null)
|
||||||
|
{
|
||||||
|
Search = search;
|
||||||
|
RawQuery = rawQuery;
|
||||||
|
Terms = terms;
|
||||||
|
ActionKeyword = actionKeyword;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raw query, this includes action keyword if it has
|
/// Raw query, this includes action keyword if it has
|
||||||
/// We didn't recommend use this property directly. You should always use Search property.
|
/// We didn't recommend use this property directly. You should always use Search property.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue