private PhoneService GetWithGpsAndConnectionAndSensor(
     IConnection connection,
     IGps gps,
     ISpeedSensor sensor)
 {
     return(new PhoneService(connection, gps, sensor));
 }
 public Speedometer(ISpeedSensor speedSensor, Preferences preferences)
 {
     _preferences = preferences;
 }
Ejemplo n.º 3
0
 public PhoneService(IConnection connection, IGps gps, ISpeedSensor speedSensor)
 {
     this.connection  = connection;
     this.gps         = gps;
     this.speedSensor = speedSensor;
 }
 public PhoneServiceBuilder WithSpeedSensor(ISpeedSensor sensor)
 {
     this.speedSensor = sensor;
     return(this);
 }