# EmailStoreQuery

Bounded query evaluated over lightweight summaries from an open store session.

Class 

`OfficeIMO.Email.Store`

**Namespace**

`OfficeIMO.Email.Store`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[EmailStoreQuery.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L8)

**Modifiers**

sealed

Bounded query evaluated over lightweight summaries from an open store session.

## Inheritance

- object
- EmailStoreQuery

## Usage

Explore 4 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 [EmailStoreContentQuery.MetadataFilter](/api/email/officeimo-email-store-emailstorecontentquery/#property-metadatafilter)

### Accepted by parameters 3

- Constructor [EmailStoreContentQuery.EmailStoreContentQuery](/api/email/officeimo-email-store-emailstorecontentquery/#constructor-ctor-collections-generic-ienumerable-system-string-officeimo-email-store-emailstorecontentsearchfields-officeimo-email-store-emailstorecontentmatchmode-officeimo-email-store-emailstorequery-int32-int32-int64-int32-int32-int32-boolean-officeimo-email-store-emailstorecontentsearchcheckpoint) parameter `metadataFilter`
- Method [EmailStoreSession.Search](/api/email/officeimo-email-store-emailstoresession/#method-search-officeimo-email-store-emailstorequery-threading-cancellationtoken) parameter `query`
- Method [EmailStoreSession.SearchWithReport](/api/email/officeimo-email-store-emailstoresession/#method-searchwithreport-officeimo-email-store-emailstorequery-threading-cancellationtoken) parameter `query`

Filter members 

Show inherited

## Constructors

`public EmailStoreQuery(string? folderId = null, bool includeDescendants = false, bool includeAssociatedItems = false, bool includeOrphanedItems = false, OutlookItemKind? itemKind = null, string? subjectContains = null, string? senderContains = null, DateTimeOffset? since = null, DateTimeOffset? before = null, bool? hasAttachments = null, bool? isRead = null, int maxItemsScanned = 1000000, int maxResults = 1000)` [#](#member-868e20e98a0ed760424e958e)

[EmailStoreQuery.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L8)

Creates a bounded store query.

Parameters

**folderId string? = null optional**

**includeDescendants bool = false optional**

**includeAssociatedItems bool = false optional**

**includeOrphanedItems bool = false optional**

**itemKind OfficeIMO.Email.OutlookItemKind? = null optional**

**subjectContains string? = null optional**

**senderContains string? = null optional**

**since System.DateTimeOffset? = null optional**

**before System.DateTimeOffset? = null optional**

**hasAttachments bool? = null optional**

**isRead bool? = null optional**

**maxItemsScanned int = 1000000 optional**

**maxResults int = 1000 optional**

## 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? FolderId { get; }` [#](#property-folderid)

[EmailStoreQuery.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L43)

Optional folder identifier. Null searches every folder.

`public bool IncludeDescendants { get; }` [#](#property-includedescendants)

[EmailStoreQuery.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L46)

Whether descendants of [EmailStoreQuery.FolderId](/api/email/officeimo-email-store-emailstorequery/) are included.

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

[EmailStoreQuery.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L49)

Whether folder-associated information items are searched.

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

[EmailStoreQuery.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L52)

Whether items recovered outside folder contents tables are searched.

`public OutlookItemKind? ItemKind { get; }` [#](#property-itemkind)

[EmailStoreQuery.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L55)

Optional typed Outlook item filter.

`public string? SubjectContains { get; }` [#](#property-subjectcontains)

[EmailStoreQuery.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L58)

Optional case-insensitive subject fragment.

`public string? SenderContains { get; }` [#](#property-sendercontains)

[EmailStoreQuery.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L61)

Optional case-insensitive sender name or address fragment.

`public DateTimeOffset? Since { get; }` [#](#property-since)

[EmailStoreQuery.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L64)

Optional inclusive lower bound applied to received time, then sent time.

`public DateTimeOffset? Before { get; }` [#](#property-before)

[EmailStoreQuery.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L67)

Optional exclusive upper bound applied to received time, then sent time.

`public bool? HasAttachments { get; }` [#](#property-hasattachments)

[EmailStoreQuery.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L70)

Optional declared attachment-presence filter.

`public bool? IsRead { get; }` [#](#property-isread)

[EmailStoreQuery.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L73)

Optional read-state filter.

`public int MaxItemsScanned { get; }` [#](#property-maxitemsscanned)

[EmailStoreQuery.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L76)

Maximum references whose summaries may be evaluated.

`public int MaxResults { get; }` [#](#property-maxresults)

[EmailStoreQuery.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Store/Reading/EmailStoreQuery.cs#L79)

Maximum matching results returned.

<!-- PowerForge markdown artifact sha256:0FD02266C619212E65FB3B67992D6347186EE5808C7F6CF57EA95D8B8015E9A5 -->
