Show / Hide Table of Contents

    IDataPacker Interface

    .NET Standard 2.x

    Represents an object that can package multiple types of data element together.

    Namespace: SnapObjects.Data

    Assembly: SnapObjects.Data.dll

    Syntax

      public interface IDataPacker;
    

    Properties

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

    Method

    Name Return Type Description
    AddRaw(string key, string value) void Add a raw text string as an element to the IDataPacker object.
    ContainsKey(string key) bool Checks whether a specified element exists in the current IDataPacker object.
    GetTextString(DataFormat format) string Gets a text string in the specified format which contains all elements in the current IDataPacker object.
    RemoveKey(string key) bool Removes the specified element from the IDataPacker object.

    Extension Methods

    Name Return Type Description
    AddDataTable([NotNull]this IDataPacker packer,[NotNull]string key, [NotNull]DataTable value) void Add a DataTable object as an element to the IDataPacker object.
    AddDataTable([NotNull]this IDataPacker packer,[NotNull]string key, [NotNull]DataTable value, [NotNull]bool changedOnly) void Add a DataTable object as an element to the IDataPacker object, and specifies whether to export only the changed data from the DataTable object.
    AddModel<TModel>([NotNull]this IDataPacker packer, [NotNull]string key, [NotNull]TModel value) void Adds a model object as an element to the IDataPacker object.
    AddModelEntries<TModel>([NotNull]this IDataPacker packer, [NotNull]string key,[NotNull]IEnumerable<IModelEntry<TModel>> modelEntries) void Adds an IEnumerable<IModelEntry<TModel>> object as an element to the IDataPacker object.
    AddModels<TModel>([NotNull]this IDataPacker packer, [NotNull]string key, [NotNull]IEnumerable<TModel> models) void Adds an IEnumerable<TModel> object as an element to the IDataPacker object.
    AddValue<TValue>([NotNull]this IDataPacker packer, [NotNull]string key, [NotNull]TValue value) void Adds a value as an element to the IDataPacker object.
    Back to top Generated by Appeon