예제 #1
0
 public CarConfiguration(IRaceTrack raceTrack, double fuelCapacity, TimeSpan timePerLap, double fuelConsumptionPerLap)
 {
     _raceTrack             = (RaceTrack)raceTrack;
     _fuelCapacity          = fuelCapacity;
     _timePerLap            = timePerLap;
     _fuelConsumptionPerLap = fuelConsumptionPerLap;
     _configurationId       = Guid.NewGuid();
 }
예제 #2
0
 public static bool ValidiateVehicle <T>(IRaceTrack _raceTrack, T vehiclie) where T : Vehicle
 {
     return(_raceTrack != null &&
            _raceTrack.vehicles.Count < Constraint.maxNumberVehiclesOnRaceTrack &&
            vehiclie.PassInspection);
 }
예제 #3
0
 public RaceTrackService(CoreCRUDContext context, IRaceTrack raceTrack)
 {
     _context   = context;
     _raceTrack = raceTrack;
 }