Interface IRestQuery<T>

Represents a query interface for a specific type againts the rest store

Namespace: EPiServer.Shell.Rest
Assembly: EPiServer.Shell.dll
Version: 8.11.0
Syntax
public interface IRestQuery<T>
Type Parameters
Name Description
T

Properties

Name

Gets the name of the query.

Declaration
string Name { get; }
Property Value
Type Description
System.String

The name.

Remarks

This will be used to identify which query to call.

Rank

Gets the rank (priority) of the Query.

Declaration
int Rank { get; }
Property Value
Type Description
System.Int32
Remarks

This will be used to select which query to call in case several queries share the same Name. A query with a higher rank is tried before one with a lower rank. This can be used to inject a different query which is used under certain circumstances (if CanHandleQuery(IQueryParameters) returns true.

Methods

CanHandleQuery(IQueryParameters)

Decides whether the implementation is capable to handle the current query parameters, for example based on the reference id or the content provider.

Declaration
bool CanHandleQuery(IQueryParameters parameters)
Parameters
Type Name Description
IQueryParameters parameters

The query parameters.

Returns
Type Description
System.Boolean

True to handle the query, false to let the next query (by sort order) decide if it wants to handle the query.

ExecuteQuery(IQueryParameters)

Apply your own getting, filtering, sorting and ranking (for example if you want to do sorting and paging in a database call to avoid querying for items that end up not being returned.

Declaration
QueryRange<T> ExecuteQuery(IQueryParameters parameters)
Parameters
Type Name Description
IQueryParameters parameters

The query parameters.

Returns
Type Description
QueryRange<T>