What is the maximum size of an ItemView in EWS?

ViewSize is specified at the constructor level. I found the documentation for the constructor , but it does not say how large the maximum value is.

+6
source share
3 answers

There is a limit of 2,147,483,647, since it is an Int32 data type, I used it and also tested it without returning any error if we pass ItemView (2147483647);

It simply determines the page size for the search item, if there are more search results than the size of the view page, subsequent calls using ItemView offsets must be made to return the rest of the results.

ref - http://msdn.microsoft.com/en-us/library/exchange/dd633693%28v=exchg.80%29.aspx http://msdn.microsoft.com/en-us/library/system.int32 .maxvalue.aspx

+8
source

You can specify an Int32 value in the ItemView constructor, but only a thousand items will be returned. You must specify a loop to get the remaining elements.

  bool more = true; ItemView view = new ItemView(int.MaxValue, 0, OffsetBasePoint.Beginning); view.PropertySet = PropertySet.IdOnly; FindItemsResults<Item> findResults; List<EmailMessage> emails = new List<EmailMessage>(); while (more) { findResults = service.FindItems(WellKnownFolderName.Inbox, view); foreach (var item in findResults.Items) { emails.Add((EmailMessage)item); } more = findResults.MoreAvailable; if (more) { view.Offset += 1000; } } 
+5
source

The default Exchange policy limits the page size to 1000 units. Setting the page size to a value greater than this number has no practical effect. Applications should also take into account the fact that the value of the throttling parameter EWSFindCountLimit can lead to the return of a partial result set for applications that execute parallel queries.

http://msdn.microsoft.com/en-us/library/office/jj945066(v=exchg.150).aspx

+4
source

Source: https://habr.com/ru/post/927321/


All Articles