Exemple #1
0
        public void RemoveCommand(LanguageCommand command)
        {
            var idx = CommandsList.FindIndex(com => com.ObjectId == command.ObjectId);

            if (idx >= 0)
            {
                CommandsList.RemoveAt(idx);
            }
        }
Exemple #2
0
        protected LanguageCommand AddCommandBeforeCommand(LanguageCommand existingCommand, LanguageCommand addedCommand)
        {
            var index = CommandsList.FindIndex(command => command.ObjectId == existingCommand.ObjectId);

            if (index < 0)
            {
                CommandsList.Add(addedCommand);
            }
            else
            {
                CommandsList.Insert(index, addedCommand);
            }

            return(addedCommand);
        }
Exemple #3
0
 public virtual LanguageCommand AddCommandBeforeCommand_Assign(LanguageCommand existingCommand, LanguageValueAccess lhsValue, ILanguageExpression rhsExpr)
 {
     return(AddCommandBeforeCommand(existingCommand, new CommandAssign(ChildCommandBlockScope, lhsValue, rhsExpr)));
 }
Exemple #4
0
        public LanguageCommand AddCommand(LanguageCommand command)
        {
            CommandsList.Add(command);

            return(command);
        }