forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryEngine.Deprecated.cs
More file actions
28 lines (25 loc) · 1.65 KB
/
Copy pathQueryEngine.Deprecated.cs
File metadata and controls
28 lines (25 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
namespace UnityEditor.Search
{
public partial class QueryEngine<TData>
{
[Obsolete("Parse has been deprecated. Use ParseQuery instead (UnityUpgradable) -> ParseQuery(*)")]
public Query<TData> Parse(string text, bool useFastYieldingQueryHandler = false)
{
var handlerFactory = new DefaultQueryHandlerFactory<TData>(this, useFastYieldingQueryHandler);
var pq = BuildQuery(text, handlerFactory, (evalGraph, queryGraph, errors, tokens, toggles, handler) => new ParsedQuery<TData>(text, evalGraph, queryGraph, errors, tokens, toggles, handler));
return new Query<TData>(pq.text, pq.evaluationGraph, pq.queryGraph, pq.errors, pq.tokens, pq.toggles, pq.graphHandler);
}
[Obsolete("Parse has been deprecated. Use ParseQuery instead (UnityUpgradable) -> ParseQuery<TQueryHandler, TPayload>(*)")]
public Query<TData, TPayload> Parse<TQueryHandler, TPayload>(string text, IQueryHandlerFactory<TData, TQueryHandler, TPayload> queryHandlerFactory)
where TQueryHandler : IQueryHandler<TData, TPayload>
where TPayload : class
{
var pq = BuildQuery(text, queryHandlerFactory, (evalGraph, queryGraph, errors, tokens, toggles, handler) => new ParsedQuery<TData, TPayload>(text, evalGraph, queryGraph, errors, tokens, toggles, handler));
return new Query<TData, TPayload>(pq.text, pq.evaluationGraph, pq.queryGraph, pq.errors, pq.tokens, pq.toggles, pq.graphHandler);
}
}
}