EwsSearch Method (FolderId, SearchFilter, ItemView)
Searches the specified folder for items matching the given criteria and delivers the results accordingly the specified ItemView.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public EwsItemList Search(
	FolderId id,
	SearchFilter filter,
	ItemView view
)

Parameters

id
Type: FolderId
The ID of the folder where to perform search. Null reference (Nothing in Visual Basic) not allowed.
filter
Type: SearchFilter
The EWS Managed API filter. If a null reference, no filter is applied and all the items are returned (unless view setting limits the output).
view
Type: ItemView
The settings which specify how many items to return, offset, ordering, which message properties to download. If a null reference, all the items passed through the filter are returned.

Return Value

Type: EwsItemList
If succeeded, the list of items which passed the specified criteria; otherwise, a null reference.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.
Remarks

EwsItem objects in the returned list have only Id and UniqueId properties set. To get the actual items, you'll need to download them separately, such as with DownloadItems(IEnumerableEwsItem, EwsItemParts) method.

Alternatively, you can specify PropertySet property in view object (for instance, add more properties to be requested from the Exchange server). This will make this method an alternative to DownloadItems(FolderId, ItemView, Boolean, PropertySet) method and its overloads. The current method, however, performs only a single query to the Exchange server while DownloadItems(FolderId, ItemView, Boolean, PropertySet) makes two. The current method is faster but not any property can be requested within a single call. For instance, finding and downloading messages with message bodies requires two queries (so that DownloadItems(FolderId, ItemView, Boolean, PropertySet) method must be used).

Note Note
This method requires MS Exchange 2010 at least (and EWS client must be initialized with InitEwsClient(ExchangeVersion) not less than ExchangeVersion.Exchange2010).
Note Note
This method is not implemented in .NET Core. Use SearchAsync(FolderId, SearchFilter, ItemView) instead.
See Also