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
 }
Пример #3
0
 public HomeController(ISomeDataService dataService)
 {
     _dataService = dataService ?? throw new ArgumentNullException(nameof(dataService));
 }
Пример #4
0
 public HomeController(ISomeDataService someDataService)
 {
     _someDataService = someDataService;
 }