-
Notifications
You must be signed in to change notification settings - Fork 14
Questions
Lucas Loegel edited this page Sep 26, 2018
·
7 revisions
The Select
extension method allows the create a new question that modifies the result of the source question.
var question = new PageUrl().Select(url => new Uri(url));
The SelectMany
extension method allows to create an action or a question that depends on the result of another question.
var action = TextContent.Of(label).SelectMany(text => Enter.TheValue(text).Into(otherLabel));
Questions.FromResult
can create a question that returns always the same result.
var action = Questions.FromResult("test");
Actions.Create
can be used to create a question without having to implement an IQuestion
interface.
var action = Questions.Create("Get items", actor =>
{
return actor.AskFor(TextContent.Of(ToDoItemTarget).Value));
});