public override void EnableQuickResync (CancellationToken cancellationToken = default (CancellationToken))
{
CheckDisposed ();
CheckConnected ();
CheckAuthenticated ();
if (engine.State != ImapEngineState.Authenticated)
throw new InvalidOperationException ("QRESYNC needs to be enabled immediately after authenticating.");
if ((engine.Capabilities & ImapCapabilities.QuickResync) == 0)
throw new NotSupportedException ("The IMAP server does not support the QRESYNC extension.");
if (engine.QResyncEnabled)
return;
var ic = engine.QueueCommand (cancellationToken, null, "ENABLE QRESYNC CONDSTORE\r\n");
engine.Wait (ic);
ProcessResponseCodes (ic);
if (ic.Response != ImapCommandResponse.Ok)
throw ImapCommandException.Create ("ENABLE", ic);
engine.QResyncEnabled = true;
}