# IEmailContentSource

Supplies a fresh readable stream for content that should not be retained as a resident byte array.

Interface 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[IEmailContentSource.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Model/IEmailContentSource.cs#L7)

**Modifiers**

abstract

Supplies a fresh readable stream for content that should not be retained as a resident byte array. Future mailbox stores can implement this contract without leaking store-specific handles into the email model.

## 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

- Property [EmailAttachment.ContentSource](/api/email/officeimo-email-emailattachment/#property-contentsource)

Filter members 

Show inherited

## Methods

`public abstract Stream OpenRead()` [#](#method-openread)

Opens a new readable stream. The caller owns and disposes the returned stream.

Returns

`Stream`

`public abstract Task<Stream> OpenReadAsync(CancellationToken cancellationToken = default)` [#](#method-openreadasync-threading-cancellationtoken)

Asynchronously opens a new readable stream. The caller owns and disposes the returned stream.

Parameters

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

Returns

`Task<Stream>`

## Properties

`public abstract long? Length { get; }` [#](#property-length)

Known decoded content length, or null when the source cannot determine it cheaply.

<!-- PowerForge markdown artifact sha256:1EED2D47C341A59B9409808C42C1A9AFBA3F8C6E4104605AA61875D4D1C2741F -->
