public static Interaction WithToDoItems(this Interaction interaction, params ToDoItem[] items)
 {
     foreach (ToDoItem item in items)
     {
         interaction.Add(new AddToDoItem(item));
     }
     return(interaction);
 }
コード例 #2
0
 /// <summary>
 /// Adds an attribute interaction to this attribute.
 /// </summary>
 /// <param name='tag'>
 /// Tag of the other related attribute.
 /// </param>
 /// <param name='multiplier'>
 /// The amoubt that will be multiplied with the value of the related attribute on calculation.
 /// </param>
 public void AddInteraction(string tag, float multiplier)
 {
     _interactions.Add(tag, multiplier);
 }
 public static Interaction CouldGoToDefaultPage(this Interaction interaction)
 => interaction.Add(new Browses(Uris.Home));
 public static Interaction EnterNewToDo(this Interaction interaction, CreateViewModel model)
 => interaction.Add(new CreateToDoItem(model));
 public static Interaction CouldGoToItemsCreate(this Interaction interaction)
 => interaction.Add(new Browses(Uris.Create));
 public static Interaction CouldGoToItemsPage(this Interaction interaction)
 => interaction.Add(new Browses(Uris.Items));
 public static Interaction CouldGet(this Interaction task, string uri)
 => task.Add(new GetResult(uri));
 public static Interaction CouldGoToPage(this Interaction task, string uri)
 => task.Add(new Browses(uri));