Example #1
0
        public MainPage()
        {
            InitializeComponent();

            var httpService       = new FormsHttpService();
            var conferenceService = new HttpConferenceService(httpService);

            viewModel = new MainViewModel(conferenceService);

            BindingContext = viewModel;
        }
Example #2
0
        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;
        }