RemoteTech.FlightComputer.FlightComputer.HasManeuverCommandByNode C# (CSharp) Method

HasManeuverCommandByNode() public method

Looks for the passed node on the command queue and returns true if the node is already on the list.
public HasManeuverCommandByNode ( ManeuverNode node ) : bool
node ManeuverNode Node to search in the queued commands
return bool
        public bool HasManeuverCommandByNode(ManeuverNode node)
        {
            if (_commandQueue.Count <= 0)
                return false;

            // look for ManeuverCommands
            var maneuverFound = _commandQueue.FirstOrDefault(command => (command is ManeuverCommand && ((ManeuverCommand)command).Node == node));
            return maneuverFound != null;
        }