Class IUsesQueryResultsExtensionMethods
Extension methods for IUsesQueryResults
interface
Namespace: Unity.MARS.Query
Syntax
public static class IUsesQueryResultsExtensionMethods : object
Methods
AssignQueryMatch(IUsesQueryResults, QueryMatchID, Int32, Boolean)
Try to assign a new data match to a Proxy, instead of the match being picked automatically.
Declaration
public static bool AssignQueryMatch(this IUsesQueryResults caller, QueryMatchID queryMatchId, int newMatchId, bool matchConditions = true)
Parameters
Type | Name | Description |
---|---|---|
IUsesQueryResults | caller | The object that had made a query |
QueryMatchID | queryMatchId | The query identifier to assign the match for |
Int32 | newMatchId | The identifier of the data to assign as the match |
Boolean | matchConditions | If true, all Conditions on the Proxy must be met by the new data. If false, the data only has to have all the traits required by the Proxy. |
Returns
Type | Description |
---|---|
Boolean | A description of the result of the call |
ModifyQuery(IUsesQueryResults, QueryMatchID, QueryArgs)
Notifies the MARS backend that a particular query's arguments have been modified.
Declaration
public static void ModifyQuery(this IUsesQueryResults caller, QueryMatchID queryMatchID, QueryArgs queryArgs)
Parameters
Type | Name | Description |
---|---|---|
IUsesQueryResults | caller | The object making the query |
QueryMatchID | queryMatchID | The identifier of the query |
QueryArgs | queryArgs | The different specified data requirements we are querying for |
RegisterQuery(IUsesQueryResults, QueryArgs)
Registers to get event(s) from the MARS backend
Declaration
public static QueryMatchID RegisterQuery(this IUsesQueryResults caller, QueryArgs queryArgs)
Parameters
Type | Name | Description |
---|---|---|
IUsesQueryResults | caller | The object making the query |
QueryArgs | queryArgs | The different specified data requirements we are querying for |
Returns
Type | Description |
---|---|
QueryMatchID | A ID that identifies this series of queries |
UnregisterQuery(IUsesQueryResults, QueryMatchID, Boolean)
Notifies the MARS backend that a particular query is no longer needed. This function is not required if the Registration was oneShot - the query will be unregistered automatically
Declaration
public static bool UnregisterQuery(this IUsesQueryResults caller, QueryMatchID queryMatchID, bool allMatches = false)
Parameters
Type | Name | Description |
---|---|---|
IUsesQueryResults | caller | The object that had made a query |
QueryMatchID | queryMatchID | The identifier of the query |
Boolean | allMatches | Whether to unregister all matches referring to the same query as |
Returns
Type | Description |
---|---|
Boolean | True if the query was stopped, false if the query was not currently running |