Class GenericListDataReader<T>
A class that exposes a List<T> as a System.Data.IDataReader.
Inherited Members
Namespace: IRM.Data
Assembly: IRM.dll
Syntax
public class GenericListDataReader<T> : BaseDataReader, IDataReader, IDisposable, IDataRecord where T : class
Type Parameters
|
T
|
Constructors
GenericListDataReader(IEnumerable<T>, Boolean, Boolean)
Initializes a new instance of the GenericListDataReader<T> class.
Declaration
public GenericListDataReader(IEnumerable<T> list, bool includeInternalProperties = false, bool dateTimeAsString = true)
Parameters
|
IEnumerable<T>
list
|
|
Boolean
includeInternalProperties
|
|
Boolean
dateTimeAsString
|
Properties
FieldCount
Gets the number of properties in the T.
Declaration
public override int FieldCount { get; }
Property Value
|
System.Int32
|
Overrides
Implements
IsClosed
Gets a value indicating whether the data reader is closed.
Declaration
public override bool IsClosed { get; }
Property Value
|
Boolean
true if the data reader is closed; otherwise, false. |
Overrides
Item[Int32]
Gets the value of the property located at the specified index as a string.
Declaration
public override string this[int index] { get; }
Parameters
|
System.Int32
index
The zero-based index of the property to get. |
Property Value
|
String
The value of the property located at the specified index as a string. |
Overrides
Item[String]
Gets the value of the property located at the specified index as a string.
Declaration
public override string this[string name] { get; }
Parameters
|
String
name
The name of the property to find. |
Property Value
|
String
The value of the property located at the specified index as a string. |
Overrides
Methods
Close()
Closes the System.Data.IDataReader Object.
Declaration
public override void Close()
Overrides
Dispose(Boolean)
Releases the unmanaged resources used by this instance and optionally releases the managed resources
Declaration
protected override void Dispose(bool disposing)
Parameters
|
Boolean
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
GetDataTypeName(Int32)
Gets the data type information for the specified property.
Declaration
public override string GetDataTypeName(int i)
Parameters
|
System.Int32
i
The index of the property to find. |
Returns
|
String
The data type information for the specified property. |
Overrides
Implements
GetFieldType(Int32)
Gets the System.Type information corresponding to the type of the System.Object that
would be returned from the property with the index of the T
Declaration
public override Type GetFieldType(int i)
Parameters
|
System.Int32
i
The index of the property to find. |
Returns
|
System.Type
The System.Type information corresponding to the type of the System.Object that
would be returned from the property with the index of the |
Overrides
Implements
GetName(Int32)
Gets the name of the property to find.
Declaration
public override string GetName(int i)
Parameters
|
System.Int32
i
The index of the property to find. |
Returns
|
String
The name of the property to find. |
Overrides
Implements
GetOrdinal(String)
Gets the property index of the named property.
Declaration
public override int GetOrdinal(string name)
Parameters
|
String
name
The name of the property to find. |
Returns
|
System.Int32
The property index of the named property |
Overrides
Implements
GetValue(Int32)
Gets the value of specified property.
Declaration
public override object GetValue(int i)
Parameters
|
System.Int32
i
The index of the property to find. |
Returns
|
Object
The value of specified property. |
Overrides
Implements
Read()
Advances the System.Data.IDataReader to the next record.
Declaration
public override bool Read()
Returns
|
Boolean
true if there are more rows; otherwise, false. |
Overrides
Explicit Interface Implementations
IDataRecord.Item[Int32]
Declaration
object IDataRecord.this[int i] { get; }
Parameters
|
System.Int32
i
|
Returns
|
Object
|
Implements
IDataRecord.Item[String]
Declaration
object IDataRecord.this[string name] { get; }
Parameters
|
String
name
|
Returns
|
Object
|