Interface IViewStore
Represents a store for views in the application.
Namespace: DataWeb.Structure
Assembly: DataWeb.Core.dll
Syntax
public interface IViewStore
Properties
Name
The name of the view store.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetSectionViewsCachedAsync(string, PublishMode, CancellationToken)
Asynchronously retrieves all views associated with the specified section in the specified publish mode.
Declaration
Task<IEnumerable<ViewData>> GetSectionViewsCachedAsync(string sectionIdMaster, PublishMode publishMode = PublishMode.Preview, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sectionIdMaster | The Id of the section to retrieve views for. |
| PublishMode | publishMode | The PublishMode to retrieve views for. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<ViewData>> | An enumerable of views associated with the specified section in the specified publish mode. |
GetViewAsync(ViewFilter, CancellationToken)
Asynchronously retrieves the view that matches the specified filter.
Declaration
Task<ViewData> GetViewAsync(ViewFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewFilter | filter | The ViewFilter to apply when retrieving the view. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<ViewData> | The view that matches the filter, or null if no such view exists. |
GetViewCachedAsync(string, CancellationToken)
Asynchronously retrieves the view with the specified name in the current publish mode.
Declaration
Task<ViewData> GetViewCachedAsync(string name, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the view to retrieve. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<ViewData> | The view with the specified name in the current publish mode, or null if no such view exists. |
GetViewsAsync(ViewFilter, CancellationToken)
Asynchronously retrieves all views that match the specified filter.
Declaration
Task<IEnumerable<ViewData>> GetViewsAsync(ViewFilter filter, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewFilter | filter | The ViewFilter to apply when retrieving views. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<ViewData>> | An enumerable of views that match the filter. |
GetViewsCachedAsync(PublishMode, CancellationToken)
Asynchronously retrieves all views in the specified publish mode.
Declaration
Task<IEnumerable<ViewData>> GetViewsCachedAsync(PublishMode publishMode = PublishMode.Preview, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| PublishMode | publishMode | The PublishMode to retrieve views for. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<ViewData>> | An enumerable of views in the specified publish mode. |