Cancelling File Syncronization from a background worker. RRS feed

  • Question

  • Hello,

    I'm currently running a file syncronization via a Background worker and wondered if I could cancel this using a Windows Form button?

    My FileSync class contains 3 methods, 1 public and 2 private. The public method calls the 2 private methods DetectChanges and SyncFile. The SyncFile method contains the reference to the SyncOrchestrator class that contains the Syncronize() and Cancel methods().

    For some reason I thought I could use the background worker CancelAsync() method but that doesn't seem to be working. Apologies but I'm still learning c#, so any help would be greatly appreciated.



    Thursday, March 1, 2012 8:50 PM

All replies