public MyDemoVM() { service = new SomeDataServiceImpl(); dispService = new DispatcherService(); //i use ctor injection here in order to break the dependency on SomeDataServiceImpl and on DispatcherService. //DispatcherService delegates to the App dispatcher in order to run code //on the UI thread. }
public MyDemoVM() { service = new SomeDataServiceImpl(); dispService = new DispatcherService(); //i use ctor injection here in order to break the dependency on SomeDataServiceImpl }
public HomeController(ISomeDataService dataService) { _dataService = dataService ?? throw new ArgumentNullException(nameof(dataService)); }
public HomeController(ISomeDataService someDataService) { _someDataService = someDataService; }