CustomDataRowReader Class TIBCO Spotfire 7.0 API Reference
Base class for custom data readers. Extend this class to implement a custom data reader. This can be used in for example a CustomDataSource or a CustomDataTransformation
Inheritance Hierarchy

System Object
  Spotfire.Dxp.Data DataRowReader
    Spotfire.Dxp.Application.Extension CustomDataRowReader

Namespace: Spotfire.Dxp.Application.Extension
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 18.10.8513.5432 (18.10.8513.5432)
Syntax

public abstract class CustomDataRowReader : DataRowReader
Examples

public class EveryNColumnsTransformationReader : CustomDataRowReader
{
    private DataRowReader inputReader;
    private List<DataRowReaderColumn> columns;

    public EveryNColumnsTransformationReader(DataRowReader inputReader, int n)
    {
        this.inputReader = inputReader;
        this.columns = new List<DataRowReaderColumn>();
        int i = 0;
        foreach (DataRowReaderColumn col in inputReader.Columns)
        {
            if (i % n == 0)
            {
                this.columns.Add(
                    new DataRowReaderColumn(
                    col.Name,
                    col.DataType,
                    col.Properties,
                    col.Cursor));
            }
            i++;
        }
    }

    protected override IEnumerable<DataRowReaderColumn> GetColumnsCore()
    {
        return this.columns;
    }

    protected override ResultProperties GetResultPropertiesCore()
    {
        return this.inputReader.ResultProperties;
    }

    protected override void ResetCore()
    {
        this.inputReader.Reset();
    }

    protected override bool MoveNextCore()
    {           
       this.inputReader.MoveNext();
    }
}
Version Information

Supported in: 7.0, 6.5, 6.0, 5.5, 5.0
See Also