Exemplo n.º 1
0
        public void AddPassengerNode(Passenger passenger, Node node)
        {
            var passengerNode = GetPassengerNode(passenger);

            if (passengerNode != null)
            {
                throw new InvalidOperationException($"Node already exists for passenger [{passenger.UserId}]");
            }
            _passengerNodes.Add(PassengerNode.Create(node, passenger));
        }
Exemplo n.º 2
0
        public void AddPassengerNode(Passenger passenger, Node node)
        {
            var passengerNode = _passengerNodes.SingleOrDefault(x => x.Passenger.UserId == passenger.UserId);

            if (passengerNode != null)
            {
                throw new InvalidOperationException($"Node already exist for passenger: '{passenger.UserId}'.");
            }
            _passengerNodes.Add(PassengerNode.Create(passenger, node));
        }
Exemplo n.º 3
0
        public void AddPassengerNode(Passenger passenger, Node node)
        {
            var passengerNode = GetPassengerNode(passenger);

            if (passengerNode != null)
            {
                throw new InvalidOperationException($"Node actually exist for passenger {passenger.UserId}");
            }

            _passengerNodes.Add(PassengerNode.Create(passenger, node));
        }