Coroutines depending on result of a previous coroutine

Oct 19, 2010 at 12:14 AM

Hi all

I'm working on a Silverlight app that talks to several WCF endpoints. I'm using coroutines to fire off requests for processing with these endpoints, but often have to evaluate the results or prior coroutines before moving on.

Does anyone have any examples on how to evaluate the result of a coroutine before determining what else to do?



public IEnumerator<IResult> DoSomething()
            yield return new Coroutine1();
            yield return new Coroutine2();
            // evaluate results of Coroutine2();
            // If true, show message1, else show message2
	   yield return new Coroutine3();


Oct 19, 2010 at 1:15 AM

var result = new Coroutine2();

yield return result;


//do something with result here


yield return new Coroutine3();

Oct 19, 2010 at 5:12 PM

Thank you!