Method NeverObservedShareOf
- Assembly
- MailFathom.Application.dll
NeverObservedShareOf(int, int)
Decides how much of a window may go to occurrences nobody has asked the server about yet.
public static int NeverObservedShareOf(int maxEmailCount, int previouslyObservedCandidateCount)
Parameters
maxEmailCountintThe whole window, which the two groups together may not exceed.
previouslyObservedCandidateCountintHow many already-observed occurrences are available to fill the reserve.
Returns
- int
The greatest number of never-observed occurrences this window may take, never below zero.
Remarks
Half the window is reserved for previously observed occurrences, and only as much of that reserve as there are occurrences to fill it. A folder holding none therefore gives its whole window to new mail rather than leaving half of it idle, which is what makes the rule safe to apply to a mailbox being synchronized for the first time. The caller fills whatever the never-observed group leaves over from the reserved group, so a folder whose mail has all been observed likewise uses the whole window.
Exceptions
- ArgumentOutOfRangeException
Thrown when
maxEmailCountis not positive orpreviouslyObservedCandidateCountis negative.