# EmailMessageStore

Explicit scope for repeated message reads from one open local archive.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`3b680b1b6fb1` with working tree changes

**Source**

[EmailMessageReader.cs:107](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email/Workflows/EmailMessageReader.cs#L107)

**Implements**

`IDisposable`

**Modifiers**

sealed

Explicit scope for repeated message reads from one open local archive.

## Inheritance

- object
- EmailMessageStore

## 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 [EmailMessageStore.Open](/api/email/officeimo-email-emailmessagestore/#method-open-string-threading-cancellationtoken)

Filter members 

Show inherited

## Methods

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

[EmailMessageReader.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email/Workflows/EmailMessageReader.cs#L120)

Closes the archive. Returned message views remain usable while their source is unchanged.

`public static EmailMessageStore Open(string path, CancellationToken cancellationToken = default)` [#](#method-open-string-threading-cancellationtoken)

[EmailMessageReader.cs:107](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email/Workflows/EmailMessageReader.cs#L107)

Opens one archive. The scope owns its reader.

Parameters

**path string required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailMessageStore`

`public EmailMessageReadResult Read(EmailMessageQuery? query = null, CancellationToken cancellationToken = default)` [#](#method-read-officeimo-email-emailmessagequery-threading-cancellationtoken)

[EmailMessageReader.cs:116](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email/Workflows/EmailMessageReader.cs#L116)

Reads messages while the explicit scope remains open.

Parameters

**query OfficeIMO.Email.EmailMessageQuery? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailMessageReadResult`

## Inherited Methods

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

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from object

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from object

Returns

`string?`

## Properties

`public string SourcePath { get; }` [#](#property-sourcepath)

[EmailMessageReader.cs:113](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email/Workflows/EmailMessageReader.cs#L113)

Source archive path.

<!-- PowerForge markdown artifact sha256:6DFD45431CEA744A2CFA2DFB55BED57A59E0CE8C1AA252F319EE46628E83E97F -->
