CustomDataRowReader Class TIBCO Spotfire 7.6 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

SystemObject
  Spotfire.Dxp.DataDataRowReader
    Spotfire.Dxp.Application.ExtensionCustomDataRowReader

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

C#
public abstract class CustomDataRowReader : DataRowReader

The CustomDataRowReader type exposes the following members.

Constructors

  NameDescription
Protected methodCustomDataRowReader
Initializes a new instance of the CustomDataRowReader class.
Top
Methods

  NameDescription
Public methodClose
Closes the data reader.
(Inherited from DataRowReader.)
Public methodDispose
Dispose method.
(Inherited from DataRowReader.)
Protected methodCode exampleDispose(Boolean)
Call when the caller is finished using the data reader.
(Inherited from DataRowReader.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the DataReader2 is reclaimed by garbage collection.
(Inherited from DataRowReader.)
Protected methodGetColumnsCore
The implementor should provide a list of DataRowReaderColumns that it returns.
(Inherited from DataRowReader.)
Protected methodGetResultPropertiesCore
The implementor should provide the result properties.
(Inherited from DataRowReader.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveNext
Advances the reader to the next row.
(Inherited from DataRowReader.)
Protected methodMoveNextCore
Advance to the next row. The implementor should update all DataValueCursors in the DataRowReaderColumns with values for the next row.
(Inherited from DataRowReader.)
Public methodReset
Resets the reader so that the next time MoveNext is called the first row will be returned.
(Inherited from DataRowReader.)
Protected methodResetCore
The implementor should implement this method to reset the enumerator. If this method is called then the MoveNextCore method should return the first row again when called the next time.
(Inherited from DataRowReader.)
Top
Properties

  NameDescription
Public propertyColumns
Represents a collection of the columns that the reader returns.
(Inherited from DataRowReader.)
Public propertyIsClosed
Gets a value indicating whether the data reader is closed.
(Inherited from DataRowReader.)
Public propertyResultProperties
Gets a read-only copy of the result properties, this is properties for the entire reader result and not for a specific column.
(Inherited from DataRowReader.)
Top
Examples

C#
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.6, 7.5, 7.0, 6.5, 6.0, 5.5, 5.0
See Also

Reference