Show / Hide Table of Contents

    IDataUnpacker Interface

    .NET Standard 2.x

    Represents an object that can unpack a data package which contains multiple types of elements.

    The data package must conform to the specified package format.

    Namespace: SnapObjects.Data

    Assembly: SnapObjects.Data.dll

    Syntax

    public interface IDataUnpacker;
    

    Properties

    Name Return Type Description
    Count int Gets the number of elements added in the IDataUnpacker object.
    DataFormat DataFormat Gets the format of the text specified when creating the IDataUnpacker object.
    Keys string[] Gets the keys of all of the elements in the IDataUnpacker object.
    Raw string Gets the raw string of text which contains all of the elements in the IDataUnpacker object.

    Methods

    Name Return Type Description
    ContainsKey(string key) bool Checks whether the specified key exists in the IDataUnpacker object.
    GetRaw(string key) string Gets the raw string of text for the specified element.
    RemoveKey(string key) bool Removes the element from the IDataUnpacker object according to the specified key.

    Extension Methods

    Name Return Type Description
    GetDataTable([NotNull]this IDataUnpacker dataUnPackage, [NotNull]string key) DataTable Gets the DataTable object created by the specified element.
    GetDataTable([NotNull]this IDataUnpacker dataUnPackage, [NotNull]string key, [NotNull]MappingMethod mappingMethod) DataTable Gets the DataTable object created by the specified element. You can also specify the mapping method for importing data into the DataTable object.
    GetModel([NotNull]this IDataUnpacker packer, [NotNull]string key) IDataIncludeGetter Gets the model object created by the specified element.
    GetModelEntries([NotNull]this IDataUnpacker packer, [NotNull]string key) IEnumerable<IModelEntry> Gets the IEnumerable<IModelEntry<TModel>> object created by the specified element.
    GetModelEntries([NotNull]this IDataUnpacker packer, [NotNull]string key, [NotNull]MappingMethod mappingMethod) IEnumerable<IModelEntry> Gets the IEnumerable<IModelEntry<TModel>> object created by the specified element. You can also specify the mapping method for importing data into each IModelEntry<TModel> object.
    GetModels([NotNull]this IDataUnpacker packer, [NotNull]string key) IDataIncludeGetter Gets the list of model objects created by the specified element.
    Back to top Generated by Appeon