Interface IListRequest<T>
Represents a request which can be filtered, sorted and paged.
Namespace: BiExcellence.OpenBi.Api.Commands
Assembly: BiExcellence.OpenBi.Api.dll
Syntax
public interface IListRequest<T> : IListRequest
Type Parameters
Name | Description |
---|---|
T |
Methods
AddField(string)
Adds an individual field to be requested. Can also be a table attribute.
Declaration
IListRequest<T> AddField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the field |
Returns
Type | Description |
---|---|
IListRequest<T> |
AddFilter(string, IFilter)
Adds a filter for a specific field.
Declaration
IListRequest<T> AddFilter(string name, IFilter filter)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the field. |
IFilter | filter | The filter condition. |
Returns
Type | Description |
---|---|
IListRequest<T> |
ClearFields()
Clears all existing requested fields.
Declaration
IListRequest<T> ClearFields()
Returns
Type | Description |
---|---|
IListRequest<T> |
ClearFilters()
Clears all existing filters.
Declaration
IListRequest<T> ClearFilters()
Returns
Type | Description |
---|---|
IListRequest<T> |
Count(int?)
Sets the maximum returning result size.
Declaration
IListRequest<T> Count(int? count)
Parameters
Type | Name | Description |
---|---|---|
int? | count | The count. |
Returns
Type | Description |
---|---|
IListRequest<T> |
Offset(int?)
Sets the zero based offset from which to start returning results.
Declaration
IListRequest<T> Offset(int? offset)
Parameters
Type | Name | Description |
---|---|---|
int? | offset | The offset. |
Returns
Type | Description |
---|---|
IListRequest<T> |
Search(string)
Sets text to search for in all text fields.
Declaration
IListRequest<T> Search(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value to search for. |
Returns
Type | Description |
---|---|
IListRequest<T> |
SendAsync(CancellationToken)
Sends the list request to the server.
Declaration
Task<IListResponse<T>> SendAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IListResponse<T>> | A list response. |
SortAscending(string)
Sets the field name to sort for in ascending order.
Declaration
IListRequest<T> SortAscending(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The field name for ascending sorting. |
Returns
Type | Description |
---|---|
IListRequest<T> |
SortDescending(string)
Sets the field name to sort for in descening order.
Declaration
IListRequest<T> SortDescending(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The field name for descending sorting. |
Returns
Type | Description |
---|---|
IListRequest<T> |
Extension Methods
- ListRequestExtensions.AddField<T, TResult>(IListRequest<T>, Expression<Func<T, TResult>>)
- ListRequestExtensions.AddFilter<T, TResult>(IListRequest<T>, Expression<Func<T, TResult>>, IFilter)
- ListRequestExtensions.SortAscending<T, TResult>(IListRequest<T>, Expression<Func<T, TResult>>)
- ListRequestExtensions.SortDescending<T, TResult>(IListRequest<T>, Expression<Func<T, TResult>>)
- Utils.FireEvent<T>(object, string, T)
- Utils.FireEvent<T>(object, string, object, T)