# Enumerator

Retains one mapped model until the next advance or disposal.

Struct 

`OfficeIMO.Data.BorrowedRowEnumerable`1`

**Namespace**

`OfficeIMO.Data.BorrowedRowEnumerable`1`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[RowMapping.Borrowed.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Core/Data/RowMapping.Borrowed.cs#L88)

**Base**

`ValueType`

**Modifiers**

sealed

**Attributes**

`Obsolete("Types with embedded references are not supported in this version of your compiler.", true)`

Retains one mapped model until the next advance or disposal.

## Inheritance

- ValueType
- Enumerator

## Remarks

Disposal ends this enumeration and leaves the caller-owned reader open.

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [BorrowedRowEnumerable<T>.GetEnumerator](/api/core/officeimo-data-borrowedrowenumerable/#method-getenumerator)

## Type Parameters

**T**

Filter members 

Show inherited

## Methods

`public void Dispose()` [#](#method-dispose)

[RowMapping.Borrowed.cs:119](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Core/Data/RowMapping.Borrowed.cs#L119)

Clears the current model and ends enumeration without closing the reader.

`public bool MoveNext()` [#](#method-movenext)

[RowMapping.Borrowed.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Core/Data/RowMapping.Borrowed.cs#L88)

Advances the source and invokes the factory exactly once for the next row.

Returns

`bool` True when a mapped row is current; otherwise false.

## Inherited Methods

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from ValueType

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public override string? ToString()` [#](#method-tostring)

Inherited from ValueType

Returns

`string?`

## Properties

`public T? Current { get; }` [#](#property-current)

[RowMapping.Borrowed.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Core/Data/RowMapping.Borrowed.cs#L80)

Gets the model produced by the most recent successful advance.

Exceptions

- `InvalidOperationException` – No successful advance is current, or enumeration has ended.

<!-- PowerForge markdown artifact sha256:CCC2980BD8C037B023C0A77903F5ADE0BE0D9638FA3CCDF98DB4733EDC834AA6 -->
