private void InitializeTimer() { if (timer == null) { timer = new Timer(new TimerCallback((o) => { if (Triggered != null) { FilesChangedEventArgs args = new FilesChangedEventArgs(); List <string> newList = new List <string>(changedFiles.Count); changedFiles.ForEach((item) => { newList.Add(item); }); changedFiles.Clear(); args.FilesChanged = newList; Triggered(this, args); } })); } }
private void InitializeTimer() { if (timer == null) { timer = new Timer(new TimerCallback((o) => { if (Triggered != null) { FilesChangedEventArgs args = new FilesChangedEventArgs(); List<string> newList = new List<string>(changedFiles.Count); changedFiles.ForEach((item) => { newList.Add(item); }); changedFiles.Clear(); args.FilesChanged = newList; Triggered(this, args); } })); } }
void monitor_Triggered(object sender, FilesChangedEventArgs e) { Singleton<RotorsWorkFlowStarter>.UniqueInstance.StartRotorsWorkFlow(e.FilesChanged); }