DbEnumerator Třída
Definice
Zpřístupňuje GetEnumerator() metodu, která podporuje jednoduchou iteraci přes kolekci poskytovatelem dat .NET.Exposes the GetEnumerator() method, which supports a simple iteration over a collection by a .NET data provider.
public ref class DbEnumerator : System::Collections::IEnumerator
public class DbEnumerator : System.Collections.IEnumerator
type DbEnumerator = class
interface IEnumerator
Public Class DbEnumerator
Implements IEnumerator
- Dědičnost
-
DbEnumerator
- Implementuje
Poznámky
DbEnumeratorTřída je implementována poskytovatelem dat .NET Framework, aby poskytovala podporu datových vazeb.The DbEnumerator class is implemented by a .NET Framework data provider to provide data binding support.
Podle návrhu DbEnumerator je objekt určen pro použití pouze s jednou sadou výsledků.By design, the DbEnumerator object is intended for use with only one resultset. Například pokud spustíte příkaz Batch, který obsahuje dva příkazy SELECT jazyka SQL, které vracejí různá schémata, druhý příkaz nemusí nevracejí celé schéma.For example, if you execute a batch statement containing two SQL SELECT statements that return different schemas, the second statement might not retun the entire schema. Chcete-li se této situaci vyhnout, Získejte DbEnumerator pro každou sadu výsledků a pak zavolejte NextResult
metodu objektu .NET Framework datového typu DataProvider.To avoid this situation, obtain a DbEnumerator for each resultset, and then call the NextResult
method of a .NET Framework data provider DataReader object.
Konstruktory
DbEnumerator(DbDataReader) |
Inicializuje novou instanci DbEnumerator třídy pomocí čtecího modulu dat n.Initializes a new instance of the DbEnumerator class with the give n data reader. |
DbEnumerator(DbDataReader, Boolean) |
Inicializuje novou instanci DbEnumerator třídy pomocí zadaného čtecího modulu a určí, zda se má čtecí modul automaticky zavřít po provedení iterace prostřednictvím svých dat.Initializes a new instance of the DbEnumerator class using the specified reader and indicates whether to automatically close the reader after iterating through its data. |
DbEnumerator(IDataReader) |
Inicializuje novou instanci DbEnumerator třídy pomocí zadaného |
DbEnumerator(IDataReader, Boolean) |
Inicializuje novou instanci DbEnumerator třídy pomocí zadaného typu |
Vlastnosti
Current |
Získá aktuální prvek v kolekci.Gets the current element in the collection. |
Metody
Equals(Object) |
Určí, zda se zadaný objekt rovná aktuálnímu objektu.Determines whether the specified object is equal to the current object. (Zděděno od Object) |
GetHashCode() |
Slouží jako výchozí funkce hash.Serves as the default hash function. (Zděděno od Object) |
GetType() |
Získá Type aktuální instanci.Gets the Type of the current instance. (Zděděno od Object) |
MemberwiseClone() |
Vytvoří kopii aktuálního seznamu Object .Creates a shallow copy of the current Object. (Zděděno od Object) |
MoveNext() |
Posune enumerátor na další prvek kolekce.Advances the enumerator to the next element of the collection. |
Reset() |
Nastaví enumerátor na jeho počáteční pozici, která je před prvním prvkem v kolekci.Sets the enumerator to its initial position, which is before the first element in the collection. |
ToString() |
Vrátí řetězec, který představuje aktuální objekt.Returns a string that represents the current object. (Zděděno od Object) |