Search Results for

    Show / Hide Table of Contents

    Class DataReader

    Reads and validates non temporal and/or temporal data.

    Inheritance
    System.Object
    DataReader
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: BayesServer.Data
    Assembly: BayesServer.Data.dll
    Syntax
    public sealed class DataReader

    Constructors

    DataReader(IDataReader, ReaderOptions)

    Initializes a new instance of the DataReader class.

    Declaration
    public DataReader(IDataReader reader, ReaderOptions readerOptions)
    Parameters
    Type Name Description
    System.Data.IDataReader reader

    The (non temporal) reader.

    ReaderOptions readerOptions

    The reader options.

    DataReader(IDataReader, ReaderOptions, IList<NestedDataReader>)

    Initializes a new instance of the DataReader class.

    Declaration
    public DataReader(IDataReader reader, ReaderOptions readerOptions, IList<NestedDataReader> nestedReaders)
    Parameters
    Type Name Description
    System.Data.IDataReader reader

    The (non temporal) reader.

    ReaderOptions readerOptions

    The reader options.

    System.Collections.Generic.IList<NestedDataReader> nestedReaders

    Nested table readers.

    DataReader(IDataReader, ReaderOptions, IDataReader, TemporalReaderOptions)

    Initializes a new instance of the DataReader class.

    Declaration
    public DataReader(IDataReader reader, ReaderOptions readerOptions, IDataReader temporalReader, TemporalReaderOptions temporalReaderOptions)
    Parameters
    Type Name Description
    System.Data.IDataReader reader

    The (non temporal) reader.

    ReaderOptions readerOptions

    The reader options.

    System.Data.IDataReader temporalReader

    The temporal reader.

    TemporalReaderOptions temporalReaderOptions

    The temporal reader options.

    DataReader(IDataReader, ReaderOptions, IDataReader, TemporalReaderOptions, IList<NestedDataReader>)

    Initializes a new instance of the DataReader class.

    Declaration
    public DataReader(IDataReader reader, ReaderOptions readerOptions, IDataReader temporalReader, TemporalReaderOptions temporalReaderOptions, IList<NestedDataReader> nestedReaders)
    Parameters
    Type Name Description
    System.Data.IDataReader reader

    The (non temporal) reader.

    ReaderOptions readerOptions

    The reader options.

    System.Data.IDataReader temporalReader

    The temporal reader.

    TemporalReaderOptions temporalReaderOptions

    The temporal reader options.

    System.Collections.Generic.IList<NestedDataReader> nestedReaders

    Nested table readers.

    DataReader(IDataReader, TemporalReaderOptions)

    Initializes a new instance of the DataReader class.

    Declaration
    public DataReader(IDataReader temporalReader, TemporalReaderOptions temporalReaderOptions)
    Parameters
    Type Name Description
    System.Data.IDataReader temporalReader

    The temporal reader.

    TemporalReaderOptions temporalReaderOptions

    The temporal reader options.

    Properties

    HasTemporalReader

    Gets a value indicating whether the reader includes temporal data.

    Declaration
    public bool HasTemporalReader { get; }
    Property Value
    Type Description
    System.Boolean

    NestedTableCount

    Gets the number of nested tables.

    Declaration
    public int NestedTableCount { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    Read(out ReadInfo)

    Reads the next (non temporal) record.

    Declaration
    public bool Read(out ReadInfo readInfo)
    Parameters
    Type Name Description
    ReadInfo readInfo

    Provides information about the current case id and record.

    Returns
    Type Description
    System.Boolean

    true if data was read successfully, or false if there are no further cases to read.

    Remarks

    This method must be called in order to move to the first record, and should be called repeatedly, until it returns false.

    This method must still be called, even if there is only temporal data.

    If non temporal data is present, after each call to BayesServer.Data.DataReader.Read, BayesServer.Data.DataReader.ReadTemporal must be called repeatedly until BayesServer.Data.DataReader.ReadTemporal returns false.

    See Also
    BayesServer.Data.DataReader.ReadTemporal

    ReadNested(Int32, out NestedReadInfo)

    Reads the next record from a nested table.

    Declaration
    public bool ReadNested(int nestedIndex, out NestedReadInfo nestedReadInfo)
    Parameters
    Type Name Description
    System.Int32 nestedIndex

    The zero based index of the nested table to read.

    NestedReadInfo nestedReadInfo

    Provides information about the current case id, time, and nested record.

    Returns
    Type Description
    System.Boolean

    true if the read was successful, false if there is no more data for this nested table for this case.

    Remarks

    This method must be called in order to move to the first nested record that corresponds to the current BayesServer.Data.DataReader.Read.

    This method should be called repeatedly until it returns false, within each call to BayesServer.Data.DataReader.Read, which should also be called repeatedly. This must be done for each nested table.

    See Also
    BayesServer.Data.DataReader.Read

    ReadTemporal(out TemporalReadInfo)

    Reads the next temporal record.

    Declaration
    public bool ReadTemporal(out TemporalReadInfo temporalReadInfo)
    Parameters
    Type Name Description
    TemporalReadInfo temporalReadInfo

    Provides information about the current temporal case id, time, and temporal record.

    Returns
    Type Description
    System.Boolean

    true if the read was successful, false if there is no more temporal data for this case.

    Remarks

    This method must be called in order to move to the first temporal record that corresponds to the current BayesServer.Data.DataReader.Read.

    Note that even if there is only temporal data, BayesServer.Data.DataReader.Read must still be called.

    This method should be called repeatedly until it returns false, within each call to BayesServer.Data.DataReader.Read, which should also be called repeatedly.

    See Also
    BayesServer.Data.DataReader.Read

    See Also

    EvidenceReader
    In This Article
    Back to top Copyright Bayes Server Ltd. All rights Reserved.