コード例 #1
0
        protected async override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterSingleton <IAppInfo, AppInfoImplementation>();

            containerRegistry.RegisterForNavigation <NavigationPage>();
            containerRegistry.RegisterForNavigation <LoginPage, LoginPageViewModel>();
            containerRegistry.RegisterForNavigation <LobyRoomPage, LobyRoomPageViewModel>();
            containerRegistry.RegisterForNavigation <MainPage, MainPageViewModel>();

            var videoService = new VideoService();
            await videoService.ConnectAsync();

            containerRegistry.RegisterInstance <IVideoService>(videoService);
            containerRegistry.Register <ICameraService, CameraService>();
        }