in sdk/SdkSamples/ScenarioExecution/AggregateScenarioExecutionStrategy.cs [30:57]
public bool IsScenarioComplete(IPartnerScenario scenario)
{
if (scenario == null)
{
throw new ArgumentNullException("scenario");
}
if (scenario.Children == null || scenario.Children.Count <= 0)
{
throw new ArgumentException("childScenarios must not be empty.");
}
int scenarioNumber = AggregateScenarioExecutionStrategy.ReadScenarioNumberFromConsole(scenario.Children.Count);
if (scenarioNumber > 0)
{
// run the selected child scenario
scenario.Children[scenarioNumber - 1].Run();
// the current scenario should be restarted
return false;
}
else
{
// user pressed escape, exit scenario
return true;
}
}