Ejemplo n.º 1
0
 public IfEachChildMatchQuestCommand(Predicate <Quest> predicate, IQuestCommand innerCommand)
 {
     predicate.ThrowIfNull(nameof(predicate));
     innerCommand.ThrowIfNull(nameof(innerCommand));
     _predicate = predicate;
     _inner     = innerCommand;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Receives quest to operate on and command, that represents operation on quest.
 /// </summary>
 /// <param name="quest"></param>
 /// <param name="questCommand"></param>
 public CurrentQuestCommand(Quest quest, IQuestCommand questCommand)
 {
     quest.ThrowIfNull(nameof(quest));
     questCommand.ThrowIfNull(nameof(questCommand));
     QuestRef     = quest;
     QuestCommand = questCommand;
 }
Ejemplo n.º 3
0
 public UpToRootQuestCommand(IQuestTree questTree, IQuestCommand innerCommand)
 {
     questTree.ThrowIfNull(nameof(questTree));
     innerCommand.ThrowIfNull(nameof(innerCommand));
     _questTree    = questTree;
     _innerCommand = innerCommand;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Receives quest to traverse and quest tree.
 /// </summary>
 /// <param name="quest"></param>
 /// <param name="questCommand"></param>
 protected UpHierarchyQuestCommand(Quest quest, IQuestCommand questCommand)
 {
     quest.ThrowIfNull(nameof(quest));
     questCommand.ThrowIfNull(nameof(questCommand));
     _target  = quest;
     _command = questCommand;
 }
Ejemplo n.º 5
0
        public IfElseQuestCommand(IQuestCommand ifCommand, IQuestCommand elseCommand)
        {
            ifCommand.ThrowIfNull(nameof(ifCommand));
            elseCommand.ThrowIfNull(nameof(elseCommand));

            _ifCommand   = ifCommand;
            _elseCommand = elseCommand;
        }
 /// <summary>
 /// Receives quest to traverse.
 /// </summary>
 /// <param name="quest"></param>
 /// <param name="beforeTraverseCommand"></param>
 /// <param name="afterTraverseCommand"></param>
 public DownHierarchyQuestCommand(Quest quest, IQuestCommand beforeTraverseCommand, IQuestCommand afterTraverseCommand)
 {
     quest.ThrowIfNull(nameof(quest));
     beforeTraverseCommand.ThrowIfNull(nameof(beforeTraverseCommand));
     afterTraverseCommand.ThrowIfNull(nameof(afterTraverseCommand));
     _target = quest;
     _beforeTraverseCommand = beforeTraverseCommand;
     _afterTraverseCommand  = afterTraverseCommand;
 }