//public UnityController() //{ // _localWeatherServiceProvider = new LocalWeatherServiceProvider();//ctor is creating the object,we want to give this responsibility to some other framework/external class. //} public UnityController(ILocalWeatherServiceProvider localWeatherServiceProvider , IFacebookConnectionManager facebookConnectionManager) { _localWeatherServiceProvider = localWeatherServiceProvider; _facebookConnectionManager = facebookConnectionManager; }
public UnityDemoController(ILocalWeatherServiceProvider weatherServiceProvider, IFacebookConnectionManager faceBookConnectionManager) { _weatherServiceProvider = weatherServiceProvider; _facebookConnectionManager = faceBookConnectionManager; }