Created
December 9, 2019 10:15
-
-
Save Uli-Armbruster/7429e9dc665a87a0ae9100d3e3b42d68 to your computer and use it in GitHub Desktop.
ProcessStepTimeout.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var totalTimeout = Observable | |
.Throw<TimeoutException>(new TimeoutException("my own text")) | |
.DelaySubscription(TimeSpan.FromSeconds(10)); | |
var processStepTimeout = Observable | |
.FromEventPattern(btn_nextStep, nameof(btn_nextStep.Click)) | |
.Timeout(TimeSpan.FromSeconds(3)); | |
var sub = totalTimeout.Amb(processStepTimeout).Subscribe(ex => {}, ex => MessageBox.Show(ex.Message)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment