Пример #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;
        }
Пример #2
0
 public void SetDestination(Parking destination)
 {
     ArrivalParking   = destination;
     ArrivalParkingId = destination.Id;
 }
Пример #3
0
 public void SetDeparture(Parking departure)
 {
     DepartureParking   = departure;
     DepartureParkingId = departure.Id;
 }