Re: session.SynchronizeDirectories can not be stopped if its started?
The simple way to do this in C# would be to register with the token like this:
However the
I'm not sure how to get the token from the place where the download begins all the way to the event handler because that is coming in on a different thread.
cancellationToken.Register(session.Abort);
However the
session.Abort
doc https://winscp.net/eng/docs/library_session_abort says
To cancel a file transfer, useFileTransferProgressEventArgs.Cancel
instead.
I'm not sure how to get the token from the place where the download begins all the way to the event handler because that is coming in on a different thread.