Table of Contents

Class InfoDataSet<TInfo>

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

CMS DataSet class. Enhancement to DataSet to provide strongly typed collection side-by-side with the data.

public class InfoDataSet<TInfo> : DataSet, IReadOnlyFlag, IInfoDataSet where TInfo : BaseInfo

Type Parameters

TInfo
Inheritance
object
MarshalByValueComponent
DataSet
InfoDataSet<TInfo>
Implements
Extension Methods

Constructors

InfoDataSet()

Constructor

public InfoDataSet()

InfoDataSet(DataSet)

Constructor, creates new DataSet using data from the given DataSet. Removes data from the original data set.

public InfoDataSet(DataSet sourceData)

Parameters

sourceData DataSet

Source data

InfoDataSet(params TInfo[])

Constructor

public InfoDataSet(params TInfo[] items)

Parameters

items TInfo[]

Source items from which the DataSet will be created

Fields

mItems

Items in the DataSet

protected InfoObjectCollection<TInfo> mItems

Field Value

InfoObjectCollection<TInfo>

Properties

IsReadOnly

If true, the dataset is cached (not allowed to modify, must be cloned)

public bool IsReadOnly { get; set; }

Property Value

bool

Items

Items in the DataSet

public virtual InfoObjectCollection<TInfo> Items { get; }

Property Value

InfoObjectCollection<TInfo>

Methods

AddItems(params TInfo[])

Adds the items to the data set

protected void AddItems(params TInfo[] items)

Parameters

items TInfo[]

Items to add

Clone()

Clones the DataSet

public InfoDataSet<TInfo> Clone()

Returns

InfoDataSet<TInfo>

CreateEmptyDataSet()

Creates the empty DataSet based on the current type

protected void CreateEmptyDataSet()

GetEnumerator()

Gets the strongly typed enumerator for the collection

public virtual IEnumerator<TInfo> GetEnumerator()

Returns

IEnumerator<TInfo>

GetNewObject(DataRow)

Gets new instance of the object hosted in this DataSet

public TInfo GetNewObject(DataRow dr)

Parameters

dr DataRow

Data row with the source data

Returns

TInfo

GetObjectEnumerator()

Gets the object enumerator for the collection

protected virtual IEnumerator<TInfo> GetObjectEnumerator()

Returns

IEnumerator<TInfo>

NewCollection()

Creates new collection of the objects

protected virtual InfoObjectCollection<TInfo> NewCollection()

Returns

InfoObjectCollection<TInfo>