Table of Contents

Class MemoryDataQuerySource

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Data query source as DataSet

public class MemoryDataQuerySource : DataQuerySource
Inheritance
object
MemoryDataQuerySource
Inherited Members
Extension Methods

Constructors

MemoryDataQuerySource(DataSet)

Constructor

public MemoryDataQuerySource(DataSet sourceData)

Parameters

sourceData DataSet

Source data

MemoryDataQuerySource(Func<DataSet>)

Constructor

public MemoryDataQuerySource(Func<DataSet> getSourceData)

Parameters

getSourceData Func<DataSet>

Function to dynamically get the source data at the given moment

Properties

DataSourceName

Data source identifier.

public override string DataSourceName { get; }

Property Value

string

Remarks

Source identifiers are used to determine whether sub queries should be materialized or inserted directly into parent query. If name is not set, new name is generated. Generated name is not cached, MemoryDataQuerySource must always be non-compatible even with the same instance. For more information HasCompatibleSource(IDataQuery) method.

GetSourceData

Function to dynamically get the source data at the given moment

protected Func<DataSet> GetSourceData { get; set; }

Property Value

Func<DataSet>

SourceData

Source data

protected DataSet SourceData { get; set; }

Property Value

DataSet

Methods

GetCount(DataQuerySourceParameters)

Returns the number of rows in the result queried by this data source if GetData is called with the same parameters

public override int GetCount(DataQuerySourceParameters parameters)

Parameters

parameters DataQuerySourceParameters

Source parameters

Returns

int

GetData(DataQuerySourceParameters)

Executes the query

public override DataSet GetData(DataQuerySourceParameters parameters)

Parameters

parameters DataQuerySourceParameters

Query parameters

Returns

DataSet

GetDataSourceName()

Gets data source identifier.

protected override string GetDataSourceName()

Returns

string

Remarks

Source identifiers are used to determine whether sub queries should be materialized or inserted directly into parent query.