コード例 #1
0
ファイル: App.xaml.cs プロジェクト: knromaric/MVVM
        public App()
        {
            InitializeComponent();
            //create the container
            var unityContainer = new UnityContainer();

            //Register the dependencies
            unityContainer.RegisterType <IQuotes, QuotesApi>();
            //configure the application to look for our dependencies within this container using service locator
            ServiceLocator.SetLocatorProvider(() => new UnityServiceLocator(unityContainer));
            MainPage = new QuotesPage();
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: xadam1/QuotesApp
        public App()
        {
            InitializeComponent();

            MainPage = new QuotesPage();
        }