DataWeb
Search Results for

    Show / Hide Table of Contents

    Class FormStore

    Inheritance
    object
    FormStore
    Implements
    IFormStore
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Data.SqlServer
    Assembly: DataWeb.Data.SqlServer.dll
    Syntax
    public class FormStore : IFormStore

    Constructors

    FormStore(ISqlHelper, ICacheService)

    Declaration
    public FormStore(ISqlHelper sqlHelper, ICacheService cacheService)
    Parameters
    Type Name Description
    ISqlHelper sqlHelper
    ICacheService cacheService

    Properties

    Name

    Gets the name of the store implementation.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Methods

    GetFormAsync(FormFilter, string, CancellationToken)

    Retrieves the first form matching the specified filter with localized control titles, or null if none is found.

    Declaration
    public Task<FormData> GetFormAsync(FormFilter filter, string culture, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    FormFilter filter

    The filter criteria used to query the form.

    string culture

    The culture code for form localization (e.g., "en-US").

    CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<FormData>

    The first matching FormData, or null.

    GetFormCachedAsync(string, string, CancellationToken)

    Retrieves a form by name with localized control titles, using the cache when available.

    Declaration
    public 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 code for form localization (e.g., "en-US").

    CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<FormData>

    The cached or freshly loaded FormData, or null if not found.

    GetFormsAsync(FormFilter, string, CancellationToken)

    Retrieves a collection of forms matching the specified filter with localized control titles.

    Declaration
    public Task<IEnumerable<FormData>> GetFormsAsync(FormFilter filter, string culture, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    FormFilter filter

    The filter criteria used to query forms.

    string culture

    The culture code for form localization (e.g., "en-US").

    CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<IEnumerable<FormData>>

    A collection of FormData matching the filter.

    GetSubFieldValue(string, object)

    Extracts a sub-field value from a JSON-serialized field value.

    Declaration
    public object GetSubFieldValue(string subField, object fieldValue)
    Parameters
    Type Name Description
    string subField

    The name of the sub-field to extract.

    object fieldValue

    The JSON-serialized field value.

    Returns
    Type Description
    object

    The sub-field value, or null if not found.

    ParseAllStructuredData(string)

    Parses JSON-serialized data and returns its root element.

    Declaration
    public object ParseAllStructuredData(string value)
    Parameters
    Type Name Description
    string value

    The JSON-serialized data.

    Returns
    Type Description
    object

    The root JsonElement, or null if value is null or empty.

    ParseCurrentStructuredData(string)

    Parses JSON-serialized structured data into a list of dictionaries.

    Declaration
    public List<Dictionary<string, object>> ParseCurrentStructuredData(string value)
    Parameters
    Type Name Description
    string value

    The JSON-serialized structured data. Can be an array or a single object.

    Returns
    Type Description
    List<Dictionary<string, object>>

    A list of dictionaries, one per array element or object.

    SerializeStructuredData(object)

    Serializes an object to a JSON string representation of structured data.

    Declaration
    public string SerializeStructuredData(object value)
    Parameters
    Type Name Description
    object value

    The object to serialize.

    Returns
    Type Description
    string

    The JSON-serialized representation.

    Implements

    IFormStore
    In this article
    Back to top Generated by DocFX