# EmailStoreReaderOptions

Safety and materialization limits for email-store readers.

Class 

`OfficeIMO.Email.Store`

**Namespace**

`OfficeIMO.Email.Store`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[EmailStoreReaderOptions.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L6)

**Modifiers**

sealed

Safety and materialization limits for email-store readers.

## Inheritance

- object
- EmailStoreReaderOptions

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Read and Convert PST, OST, and Mailbox Stores](/docs/email/mailbox-stores/) Guide
  
  Open PST, OST, OLM, mbox, EMLX, Apple Mail, and Maildir stores, export their messages, and convert a store to a new PST with verification.

## Usage

Explore 12 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 4

- Property [EmailDataOpenOptions.Store](/api/email/officeimo-email-data-emaildataopenoptions/#property-store)
- Property [EmailStoreMergeSource.ReaderOptions](/api/email/officeimo-email-store-emailstoremergesource/#property-readeroptions)
- Property [EmailStoreReaderOptions.Default](/api/email/officeimo-email-store-emailstorereaderoptions/#property-default)
- Property [EmailStoreSalvageOptions.ReaderOptions](/api/email/officeimo-email-store-emailstoresalvageoptions/#property-readeroptions)

### Accepted by parameters 8

- Constructor [EmailDataOpenOptions.EmailDataOpenOptions](/api/email/officeimo-email-data-emaildataopenoptions/#constructor-ctor-officeimo-email-emailreaderoptions-officeimo-email-contentlinereaderoptions-officeimo-email-store-emailstorereaderoptions-officeimo-email-addressbook-offlineaddressbookreaderoptions-nullable-officeimo-email-data-emaildataartifactkind-boolean) parameter `store`
- Method [EmailStoreConverter.ConvertMailbox](/api/email/officeimo-email-store-emailstoreconverter/#method-convertmailbox-string-string-officeimo-email-store-emailstoremailboxformat-officeimo-email-store-emailstorereaderoptions-officeimo-email-store-emailstoremailboxconversionoptions-threading-cancellationtoken) parameter `readerOptions`
- Method [EmailStoreConverter.ConvertToPst](/api/email/officeimo-email-store-emailstoreconverter/#method-converttopst-string-string-officeimo-email-store-emailstorereaderoptions-officeimo-email-store-emailstorepstconversionoptions-threading-cancellationtoken) parameter `readerOptions`
- Constructor [EmailStoreMergeSource.EmailStoreMergeSource](/api/email/officeimo-email-store-emailstoremergesource/#constructor-ctor-string-string-officeimo-email-store-emailstorereaderoptions) parameter `readerOptions`
- Constructor [EmailStoreReader.EmailStoreReader](/api/email/officeimo-email-store-emailstorereader/#constructor-ctor-officeimo-email-store-emailstorereaderoptions) parameter `options`
- Constructor [EmailStoreSalvageOptions.EmailStoreSalvageOptions](/api/email/officeimo-email-store-emailstoresalvageoptions/#constructor-ctor-nullable-officeimo-email-emailfileformat-boolean-boolean-int32-boolean-officeimo-email-store-emailstorereaderoptions-officeimo-email-emailwriteroptions) parameter `readerOptions`
- Method [EmailStoreSession.Open](/api/email/officeimo-email-store-emailstoresession/#method-open-string-officeimo-email-store-emailstorereaderoptions-threading-cancellationtoken) parameter `options`
- Method [EmailStoreSession.OpenSnapshot](/api/email/officeimo-email-store-emailstoresession/#method-opensnapshot-string-officeimo-email-store-emailstorereaderoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

EmailStoreReaderOptions 2 overloads

`public EmailStoreReaderOptions(long maxInputBytes = 1099511627776, int maxNodeCount = 25000000, int maxBTreeDepth = 32, int maxCachedBTreePages = 512, int maxFolderCount = 100000, int maxItemCount = 1000000, int maxPropertiesPerItem = 16384, long maxDecodedPropertyBytesPerItem = 134217728, int maxAttachmentsPerItem = 10000, long maxAttachmentBytes = 536870912, long maxTotalAttachmentBytes = 4294967296, bool retainAttachmentContent = true, string? pstPassword = null, Encoding? pstPasswordEncoding = null, bool includeAssociatedItems = false, bool includeOrphanedItems = false, int maxNestedMessageDepth = 16, int maxArchiveEntries = 500000, long maxArchiveEntryBytes = 536870912, long maxArchiveDecodedBytes = 8589934592, long maxXmlCharactersPerItem = 67108864, long maxMessageBytes = 268435456, int maxDirectoryDepth = 64, int maxDirectoryFileCount = 1000000, long maxDecodedTableBytes = 8589934592, int maxDirectoryEntryCount = 2000000)` [#](#constructor-ctor-int64-int32-int32-int32-int32-int32-int32-int64-int32-int64-int64-boolean-string-text-encoding-boolean-boolean-int32-int32-int64-int64-int64-int64-int32-int32-int64-int32)

[EmailStoreReaderOptions.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L6)

Creates bounded reader options.

Parameters

**maxInputBytes long = 1099511627776 optional**

**maxNodeCount int = 25000000 optional**

**maxBTreeDepth int = 32 optional**

**maxCachedBTreePages int = 512 optional**

**maxFolderCount int = 100000 optional**

**maxItemCount int = 1000000 optional**

**maxPropertiesPerItem int = 16384 optional**

**maxDecodedPropertyBytesPerItem long = 134217728 optional**

**maxAttachmentsPerItem int = 10000 optional**

**maxAttachmentBytes long = 536870912 optional**

**maxTotalAttachmentBytes long = 4294967296 optional**

**retainAttachmentContent bool = true optional**

**pstPassword string? = null optional**

**pstPasswordEncoding System.Text.Encoding? = null optional**

**includeAssociatedItems bool = false optional**

**includeOrphanedItems bool = false optional**

**maxNestedMessageDepth int = 16 optional**

**maxArchiveEntries int = 500000 optional**

**maxArchiveEntryBytes long = 536870912 optional**

**maxArchiveDecodedBytes long = 8589934592 optional**

**maxXmlCharactersPerItem long = 67108864 optional**

**maxMessageBytes long = 268435456 optional**

**maxDirectoryDepth int = 64 optional**

**maxDirectoryFileCount int = 1000000 optional**

**maxDecodedTableBytes long = 8589934592 optional**

**maxDirectoryEntryCount int = 2000000 optional**

`public EmailStoreReaderOptions(long maxInputBytes, int maxNodeCount, int maxBTreeDepth, int maxCachedBTreePages, int maxFolderCount, int maxItemCount, int maxPropertiesPerItem, long maxDecodedPropertyBytesPerItem, int maxAttachmentsPerItem, long maxAttachmentBytes, long maxTotalAttachmentBytes, bool retainAttachmentContent, string? pstPassword, Encoding? pstPasswordEncoding, bool includeAssociatedItems, bool includeOrphanedItems, int maxNestedMessageDepth, int maxArchiveEntries, long maxArchiveEntryBytes, long maxArchiveDecodedBytes, long maxXmlCharactersPerItem, long maxMessageBytes, int maxDirectoryDepth, int maxDirectoryFileCount, long maxDecodedTableBytes)` [#](#constructor-ctor-int64-int32-int32-int32-int32-int32-int32-int64-int32-int64-int64-boolean-string-text-encoding-boolean-boolean-int32-int32-int64-int64-int64-int64-int32-int32-int64)

[EmailStoreReaderOptions.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L89)

Creates options using the original constructor contract with the default directory-entry bound.

Parameters

**maxInputBytes long required**

**maxNodeCount int required**

**maxBTreeDepth int required**

**maxCachedBTreePages int required**

**maxFolderCount int required**

**maxItemCount int required**

**maxPropertiesPerItem int required**

**maxDecodedPropertyBytesPerItem long required**

**maxAttachmentsPerItem int required**

**maxAttachmentBytes long required**

**maxTotalAttachmentBytes long required**

**retainAttachmentContent bool required**

**pstPassword string? required**

**pstPasswordEncoding System.Text.Encoding? required**

**includeAssociatedItems bool required**

**includeOrphanedItems bool required**

**maxNestedMessageDepth int required**

**maxArchiveEntries int required**

**maxArchiveEntryBytes long required**

**maxArchiveDecodedBytes long required**

**maxXmlCharactersPerItem long required**

**maxMessageBytes long required**

**maxDirectoryDepth int required**

**maxDirectoryFileCount int required**

**maxDecodedTableBytes long required**

## 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 static EmailStoreReaderOptions Default { get; }` [#](#property-default)

[EmailStoreReaderOptions.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L92)

Default bounded options.

`public long MaxInputBytes { get; }` [#](#property-maxinputbytes)

[EmailStoreReaderOptions.cs:108](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L108)

Maximum seekable source length.

`public int MaxNodeCount { get; }` [#](#property-maxnodecount)

[EmailStoreReaderOptions.cs:110](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L110)

Maximum NDB nodes and blocks visited.

`public int MaxBTreeDepth { get; }` [#](#property-maxbtreedepth)

[EmailStoreReaderOptions.cs:112](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L112)

Maximum tree traversal depth.

`public int MaxCachedBTreePages { get; }` [#](#property-maxcachedbtreepages)

[EmailStoreReaderOptions.cs:114](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L114)

Maximum PST/OST B-tree pages retained by the bounded random-access cache.

`public int MaxFolderCount { get; }` [#](#property-maxfoldercount)

[EmailStoreReaderOptions.cs:116](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L116)

Maximum folders materialized.

`public int MaxItemCount { get; }` [#](#property-maxitemcount)

[EmailStoreReaderOptions.cs:118](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L118)

Maximum items materialized.

`public int MaxPropertiesPerItem { get; }` [#](#property-maxpropertiesperitem)

[EmailStoreReaderOptions.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L120)

Maximum MAPI properties decoded per item.

`public long MaxDecodedPropertyBytesPerItem { get; }` [#](#property-maxdecodedpropertybytesperitem)

[EmailStoreReaderOptions.cs:122](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L122)

Maximum decoded property bytes per item.

`public int MaxAttachmentsPerItem { get; }` [#](#property-maxattachmentsperitem)

[EmailStoreReaderOptions.cs:124](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L124)

Maximum attachments per item.

`public long MaxAttachmentBytes { get; }` [#](#property-maxattachmentbytes)

[EmailStoreReaderOptions.cs:126](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L126)

Maximum decoded bytes in one attachment.

`public long MaxTotalAttachmentBytes { get; }` [#](#property-maxtotalattachmentbytes)

[EmailStoreReaderOptions.cs:128](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L128)

Maximum decoded attachment bytes across the read.

`public bool RetainAttachmentContent { get; }` [#](#property-retainattachmentcontent)

[EmailStoreReaderOptions.cs:130](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L130)

Whether attachment payloads are retained in memory.

`public string? PstPassword { get; }` [#](#property-pstpassword)

[EmailStoreReaderOptions.cs:132](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L132)

Password to validate when PidTagPstPassword is nonzero. The value is never logged or retained by results.

`public Encoding PstPasswordEncoding { get; }` [#](#property-pstpasswordencoding)

[EmailStoreReaderOptions.cs:134](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L134)

Byte encoding used for the legacy PST password checksum. Defaults to ASCII.

`public bool IncludeAssociatedItems { get; }` [#](#property-includeassociateditems)

[EmailStoreReaderOptions.cs:136](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L136)

Whether folder-associated information items are materialized separately from visible items.

`public bool IncludeOrphanedItems { get; }` [#](#property-includeorphaneditems)

[EmailStoreReaderOptions.cs:138](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L138)

Whether NBT item nodes absent from folder contents tables are recovered using their parent links.

`public int MaxNestedMessageDepth { get; }` [#](#property-maxnestedmessagedepth)

[EmailStoreReaderOptions.cs:140](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L140)

Maximum embedded-message recursion depth. Zero preserves the attachment without projecting its item.

`public int MaxArchiveEntries { get; }` [#](#property-maxarchiveentries)

[EmailStoreReaderOptions.cs:142](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L142)

Maximum entries accepted from a compressed email-store archive.

`public long MaxArchiveEntryBytes { get; }` [#](#property-maxarchiveentrybytes)

[EmailStoreReaderOptions.cs:144](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L144)

Maximum decoded size declared by one compressed archive entry.

`public long MaxArchiveDecodedBytes { get; }` [#](#property-maxarchivedecodedbytes)

[EmailStoreReaderOptions.cs:146](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L146)

Maximum total decoded size declared by all compressed archive entries.

`public long MaxXmlCharactersPerItem { get; }` [#](#property-maxxmlcharactersperitem)

[EmailStoreReaderOptions.cs:148](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L148)

Maximum XML characters parsed from one archive item.

`public long MaxMessageBytes { get; }` [#](#property-maxmessagebytes)

[EmailStoreReaderOptions.cs:150](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L150)

Maximum RFC 5322/MIME message bytes accepted from one store item.

`public int MaxDirectoryDepth { get; }` [#](#property-maxdirectorydepth)

[EmailStoreReaderOptions.cs:152](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L152)

Maximum directory depth traversed by mailbox-directory sessions.

`public int MaxDirectoryFileCount { get; }` [#](#property-maxdirectoryfilecount)

[EmailStoreReaderOptions.cs:154](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L154)

Maximum message and identified Apple attachment-storage files indexed by one mailbox-directory session.

`public long MaxDecodedTableBytes { get; }` [#](#property-maxdecodedtablebytes)

[EmailStoreReaderOptions.cs:156](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L156)

Maximum decoded bytes traversed from one PST/OST table data tree.

`public int MaxDirectoryEntryCount { get; }` [#](#property-maxdirectoryentrycount)

[EmailStoreReaderOptions.cs:158](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreReaderOptions.cs#L158)

Maximum filesystem entries visited, including directories, sidecars and unrelated files.

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