Class ListService
Provides a service to retrieve and manipulate lists of items.
Implements
Inherited Members
Namespace: DataWeb.Data
Assembly: DataWeb.Core.dll
Syntax
public sealed class ListService : IListService
Remarks
Initializes a new instance of the ListService class with the specified list store.
Constructors
ListService(IListStore)
Provides a service to retrieve and manipulate lists of items.
Declaration
public ListService(IListStore listStore)
Parameters
Type | Name | Description |
---|---|---|
IListStore | listStore | The list store to use for retrieving lists. |
Remarks
Initializes a new instance of the ListService class with the specified list store.
Methods
GetListAsync(string, string, CancellationToken)
Gets a list of items by name and culture.
Declaration
public Task<List> GetListAsync(string name, string culture = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the list to retrieve. |
string | culture | The culture for which to retrieve the list. If null, the default culture is used. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List> | The list of items. |
GetListsAsync(string, CancellationToken)
Gets all lists of items in the specified culture.
Declaration
public Task<IEnumerable<List>> GetListsAsync(string culture = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | culture | The culture for which to retrieve the lists. If null, the default culture is used. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<List>> | An enumerable collection of lists of items. |