Ejemplo n.º 1
0
        public Route(string name, Car car, Parking departureParking, Parking arrivalParking)
        {
            Guard.Against.NullOrWhiteSpace(name, nameof(name));
            Guard.Against.Null(car, nameof(car));
            Guard.Against.Null(departureParking, nameof(departureParking));
            Guard.Against.Null(arrivalParking, nameof(arrivalParking));

            Name             = name;
            Car              = car;
            DepartureParking = departureParking;
            ArrivalParking   = arrivalParking;
        }
Ejemplo n.º 2
0
 public void SetDestination(Parking destination)
 {
     ArrivalParking   = destination;
     ArrivalParkingId = destination.Id;
 }
Ejemplo n.º 3
0
 public void SetDeparture(Parking departure)
 {
     DepartureParking   = departure;
     DepartureParkingId = departure.Id;
 }