Exemple #1
0
        private async Task HandleStageSeed(IStageSeed seed)
        {
            Contracts.Requires.That(seed != null);

            try
            {
                using (seed.LinkCancellation(this.CancellationToken))
                    using (seed.Progress.WrapExceptions(error => Wrap(seed, error)).Subscribe(this.progress.OnNext))
                    {
                        await seed.CompleteAndAwaitAsync().DontMarshallContext();
                    }
            }
            catch (Exception)
            {
                // if generation fails just end the task early in a successfully completed state so that the
                // action block keeps on processing additional stage generation requests instead of faulting
            }
        }