public MainPage() { InitializeComponent(); var httpService = new FormsHttpService(); var conferenceService = new HttpConferenceService(httpService); viewModel = new MainViewModel(conferenceService); BindingContext = viewModel; }
public MainPage() { InitializeComponent(); //https://github.com/robinmanuelthiel/xamarinworkshop/tree/master/04%20Conference%20App%20with%20Xamarin.Forms //5.7 Play the Dependency Injection game // An dieser Stelle: Dependency Injection ; Wird später per Tool überarbeitet. var httpService = new FormsHttpService(); var conferenceService = new HttpConferenceService(httpService); viewModel = new MainViewModel(conferenceService); BindingContext = viewModel; }