Zoltan Kerenyi

Zoltan Kerenyi

  • NA
  • 72
  • 12.4k

how to fire an event within the object

Nov 17 2020 12:35 PM
Hi, Im developping my filesyncer project and I got stuck.
There is a ServiceBased DB which holds this FolderPair object:
 
https://pastebin.com/Wfpbndw1
 
When the application start, there is a Static Class that holds these folder pairs in a List.
 
I'd these FolderPairs fire an event, when a file arriver into the Source, and Immadiately move that File to Destination.
 
I dont know how to achieve this. How could an object be the Issuer and the Subscriber in itself?
Or should I intruduce a new static class , lets say "Worker" who subscribe to all FolderPairs's watchdog's Created Event and do the file copy?
 
How shoudl this be done?
Thanks,
 
Zolee 
 
 

Attachment: FileSyncer.rar

Answers (2)