Table of Contents

Method NeverObservedShareOf

Namespace
MailFathom.Application.Synchronization.Reconciliation
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

maxEmailCount int

The whole window, which the two groups together may not exceed.

previouslyObservedCandidateCount int

How 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 maxEmailCount is not positive or previouslyObservedCandidateCount is negative.