DataWeb
Search Results for

    Show / Hide Table of Contents

    Class BasicItem

    Represents an item in the structure.

    Inheritance
    object
    BasicItem
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Structure
    Assembly: DataWeb.Core.dll
    Syntax
    public sealed class BasicItem
    Remarks

    Initializes a new instance of the BasicItem class.

    Constructors

    BasicItem(IBasicItemStore)

    Represents an item in the structure.

    Declaration
    public BasicItem(IBasicItemStore basicItemStore)
    Parameters
    Type Name Description
    IBasicItemStore basicItemStore
    Remarks

    Initializes a new instance of the BasicItem class.

    Properties

    Data

    Gets or sets the section data.

    Declaration
    public Dictionary<string, object> Data { get; set; }
    Property Value
    Type Description
    Dictionary<string, object>

    Id

    Gets or sets the unique identifier.

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    Methods

    CheckDataChanges(Dictionary<string, object>)

    Checks a provided data against original data in order to get modified fields.

    Declaration
    public List<string> CheckDataChanges(Dictionary<string, object> providedData)
    Parameters
    Type Name Description
    Dictionary<string, object> providedData

    The provided section data.

    Returns
    Type Description
    List<string>

    DeleteAsync(CancellationToken)

    Deletes this item by changing the status to Deleted.

    Declaration
    public Task DeleteAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    DeleteFromStorageAsync(CancellationToken)

    Deletes this item from storage.

    Declaration
    public Task DeleteFromStorageAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Init(string, string, Dictionary<string, object>)

    Initializes the item with the specified Id.

    Declaration
    public void Init(string id, string tableName, Dictionary<string, object> providedData)
    Parameters
    Type Name Description
    string id

    The Id of the item.

    string tableName

    The table used to retrieve data.

    Dictionary<string, object> providedData

    InitAsync(string, string, CancellationToken)

    Gets or sets the data fields.

    Declaration
    public Task InitAsync(string id, string storageContainer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string id

    The Id of the item.

    string storageContainer

    The container used to retrieve data.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    SaveAsync(CancellationToken)

    Saves the data of the item to the database asynchronously.

    Declaration
    public Task<List<string>> SaveAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<List<string>>

    A list of modified fields in the section data.

    UpdateStatusAsync(string, CancellationToken)

    Updates the status of this item.

    Declaration
    public Task UpdateStatusAsync(string status, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string status

    The new status for the item.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    In this article
    Back to top Generated by DocFX