Interface IFormStore
Interface for retrieving form data.
Namespace: DataWeb.Data
Assembly: DataWeb.Core.dll
Syntax
public interface IFormStore
Properties
Name
Gets the name of the form store.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetFormAsync(FormFilter, string, CancellationToken)
Retrieves a single form data object based on the provided FormFilter and culture.
Declaration
Task<FormData> GetFormAsync(FormFilter filter, string culture, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
FormFilter | filter | The FormFilter to apply to the form data. |
string | culture | The culture to retrieve the form data in. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<FormData> | A FormData object. |
GetFormCachedAsync(string, string, CancellationToken)
Retrieves a single form data object based on the provided form name and culture, using a cache if possible.
Declaration
Task<FormData> GetFormCachedAsync(string name, string culture, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the form to retrieve. |
string | culture | The culture to retrieve the form data in. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<FormData> | A FormData object. |
GetFormsAsync(FormFilter, string, CancellationToken)
Retrieves a collection of form data objects based on the provided FormFilter and culture.
Declaration
Task<IEnumerable<FormData>> GetFormsAsync(FormFilter filter, string culture, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
FormFilter | filter | The FormFilter to apply to the form data. |
string | culture | The culture to retrieve the form data in. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<FormData>> | An IEnumerable<T> of FormData objects. |
GetSubFieldValue(string, object)
Retrieves the value of a subfield based on the provided field value and subfield name.
Declaration
object GetSubFieldValue(string subField, object fieldValue)
Parameters
Type | Name | Description |
---|---|---|
string | subField | The name of the subfield. |
object | fieldValue | The value of the field containing the subfield. |
Returns
Type | Description |
---|---|
object | The value of the subfield. |
ParseAllStructuredData(string)
Parses all the structured data and returns an object.
Declaration
object ParseAllStructuredData(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value to parse. |
Returns
Type | Description |
---|---|
object | The parsed structured data. |
ParseCurrentStructuredData(string)
Parses the current structured data and returns a list of dictionaries.
Declaration
List<Dictionary<string, object>> ParseCurrentStructuredData(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value to parse. |
Returns
Type | Description |
---|---|
List<Dictionary<string, object>> | A list of dictionaries containing the parsed structured data. |
SerializeStructuredData(object)
Serializes structured data into a string.
Declaration
string SerializeStructuredData(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value | The structured data to serialize. |
Returns
Type | Description |
---|---|
string | A string representing the serialized structured data. |