private PhoneService GetWithGpsAndConnectionAndSensor( IConnection connection, IGps gps, ISpeedSensor sensor) { return(new PhoneService(connection, gps, sensor)); }
public Speedometer(ISpeedSensor speedSensor, Preferences preferences) { _preferences = preferences; }
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); }