# ReaderNestedContent

Lets a Reader handler delegate nested content to the same immutable handler set that selected it.

Class 

`OfficeIMO.Reader`

**Namespace**

`OfficeIMO.Reader`

**Assembly**

`OfficeIMO.Reader.Core`

**Source revision**

`12511d2fa560` with working tree changes

**Source**

[ReaderNestedContent.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Reader.Core/ReaderNestedContent.cs#L14)

**Modifiers**

static

Lets a Reader handler delegate nested content to the same immutable handler set that selected it.

## Inheritance

- object
- ReaderNestedContent

## Remarks

Archive, mailbox, and attachment adapters use this context to preserve selective package composition. The context is available while a handler is executing; callers outside a Reader operation have no registered nested handlers.

Filter members 

Show inherited

## Methods

`public static bool CanRead(string sourceName)` [#](#method-canread-string)

[ReaderNestedContent.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Reader.Core/ReaderNestedContent.cs#L14)

Returns true when the active Reader has a stream handler registered for the source name.

Parameters

**sourceName string required**

Returns

`bool`

`public static IReadOnlyList<ReaderChunk> Read(Stream stream, string sourceName, ReaderOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-read-io-stream-string-officeimo-reader-readeroptions-threading-cancellationtoken)

[ReaderNestedContent.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Reader.Core/ReaderNestedContent.cs#L24)

Reads nested content through the active Reader handler set.

Parameters

**stream System.IO.Stream required**

**sourceName string required**

**options OfficeIMO.Reader.ReaderOptions? = null optional**

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

Returns

`IReadOnlyList<ReaderChunk>`

`public static OfficeDocumentReadResult ReadDocument(Stream stream, string sourceName, ReaderOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-readdocument-io-stream-string-officeimo-reader-readeroptions-threading-cancellationtoken)

[ReaderNestedContent.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Reader.Core/ReaderNestedContent.cs#L34)

Reads a nested source without discarding its rich links, forms, assets or metadata.

Parameters

**stream System.IO.Stream required**

**sourceName string required**

**options OfficeIMO.Reader.ReaderOptions? = null optional**

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

Returns

`OfficeDocumentReadResult`

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

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