CellsAutomate.Mutator.Mutations.DeleteCommandMutation.AssertDeclarationCommand C# (CSharp) Method

AssertDeclarationCommand() private method

private AssertDeclarationCommand ( int index ) : void
index int
return void
        private void AssertDeclarationCommand(int index)
        {
            var comToDel = _commands[index] as ICommandDeclaration;
            for (int i = index + 1; i < _commands.Count; i++)
            {
                if (_marks[i]) continue;

                if (_commands[i] is ICommandWithArgument)
                {
                    if ((_commands[i] as ICommandWithArgument).ContainsAsArgument(comToDel.Name))
                        Delete(i);

                    if (_commands[i] is ICommandSetter)
                    {
                        if ((_commands[i] as ICommandSetter).TargetName == comToDel.Name)
                        {
                            Delete(i);
                        }
                    }
                }

            }
        }