// ---------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------
//
//
// ---------------------------------------------------------------------
namespace Microsoft.Database.Isam
{
using System.Collections;
///
/// Enumerates the fields for a given record.
///
public class RecordEnumerator : IEnumerator
{
///
/// The enumerator
///
private IDictionaryEnumerator enumerator;
///
/// Initializes a new instance of the class.
///
/// The enumerator.
internal RecordEnumerator(IDictionaryEnumerator enumerator)
{
this.enumerator = enumerator;
}
///
/// Gets the current element in the collection.
///
/// The current element in the collection.
///
/// This is the type safe version that may not work in other CLR
/// languages.
///
public FieldValueCollection Current
{
get
{
return (FieldValueCollection)this.enumerator.Value;
}
}
///
/// Gets the current element in the collection.
///
/// The current element in the collection.
///
/// This is the standard version that will work with other CLR
/// languages.
///
object IEnumerator.Current
{
get
{
return this.Current;
}
}
///
/// Sets the enumerator to its initial position, which is before the first element in the collection.
///
public void Reset()
{
this.enumerator.Reset();
}
///
/// Advances the enumerator to the next element of the collection.
///
///
/// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
///
public bool MoveNext()
{
return this.enumerator.MoveNext();
}
}
}