I have some code which initiates a download. This results in one of the following async events being triggered. I need the application to wait for one of these events before continuing.
Is this a job for tasks? Can I create a task with my download code which returns 'task complete' when one of the 3 events below fire?
(stdFile_.saver as _IStreamCollectorEvents_Event).stopped += (collector) =>
(stdFile_.saver as _IStreamCollectorEvents_Event).failed += (sender, error) =>
(video as _IStream_Events_Event).stopped += (s) =>