Interface IResourceStore
The interface for a resource store implementation, which provides CRUD operations for resources.
Namespace: DataWeb.Localization
Assembly: DataWeb.Core.dll
Syntax
public interface IResourceStore
Properties
Name
Gets the name of the resource store.
Declaration
string Name { get; }
Property Value
Type |
---|
string |
Methods
DeserializeCultureItems(string)
Deserializes the culture items from the specified string value.
Declaration
List<Resource.CultureItem> DeserializeCultureItems(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The string value to deserialize. |
Returns
Type | Description |
---|---|
List<Resource.CultureItem> | A list of Resource.CultureItem objects. |
GetResourceAsync(ResourceFilter)
Gets a resource that matches the specified filter.
Declaration
Task<Resource> GetResourceAsync(ResourceFilter filter)
Parameters
Type | Name | Description |
---|---|---|
ResourceFilter | filter | The ResourceFilter to apply. |
Returns
Type | Description |
---|---|
Task<Resource> | The resource that matches the specified filter. |
GetResourceContextsAsync()
Gets the contexts for all resources.
Declaration
Task<IEnumerable<string>> GetResourceContextsAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<string>> | An enumerable collection of context strings. |
GetResourceCountAsync(ResourceFilter)
Gets the count of resources that match the specified filter.
Declaration
Task<long> GetResourceCountAsync(ResourceFilter filter)
Parameters
Type | Name | Description |
---|---|---|
ResourceFilter | filter | The ResourceFilter to apply. |
Returns
Type | Description |
---|---|
Task<long> | The count of resources that match the specified filter. |
GetResourcesAsync(ResourceFilter)
Gets the resources that match the specified filter.
Declaration
Task<IEnumerable<Resource>> GetResourcesAsync(ResourceFilter filter)
Parameters
Type | Name | Description |
---|---|---|
ResourceFilter | filter | The ResourceFilter to apply. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Resource>> | An enumerable collection of resources. |
RemoveAsync(string)
Removes the resource with the specified Id.
Declaration
Task RemoveAsync(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The Id of the resource to remove. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |
SetAsync(Resource)
Sets the specified resource.
Declaration
Task SetAsync(Resource resource)
Parameters
Type | Name | Description |
---|---|---|
Resource | resource | The Resource to set. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |