protected override void OnMap(ContainerBuilder builder)
        {
            _navigationBuilder = new NavigationBuilder(new ContainerBuilderAdapter(builder));

            builder.RegisterInstance(_navigationBuilder).SingleInstance();
            builder.RegisterType<AppNavigationManager>().As<NavigationManagerBase>().SingleInstance();

            _navigationBuilder
                .RegisterViewModel<FrameViewModel>().StaticResource().WithoutView()
                .RegisterViewModel<MainViewModel>().Singleton().ForView<MainPage>()
                .RegisterViewModel<NotesViewModel>().StaticResource().ForView<NotesView>()
                .RegisterViewModel<NoteViewModel>().ForView<NoteView>()
                ;

            base.OnMap(builder);
        }
Ejemplo n.º 2
0
        protected override void OnMap(ContainerBuilder builder)
        {
            _navigationBuilder = new NavigationBuilder(builder);
            builder.RegisterInstance(_navigationBuilder).SingleInstance();

            builder.RegisterType<ProtobufSerializer>().As<IDtoSerializer>().SingleInstance();
            builder.RegisterType<DeviceInfo>().As<IDeviceInfo>().SingleInstance();
            builder.RegisterType<Storage>().As<IStorage>().SingleInstance();
            builder.RegisterType<NotificationService>().As<INotificationService>().SingleInstance();
            builder.RegisterType<SocketStreamTransportResource>().As<ITransportResource>().SingleInstance();
            builder.RegisterType<CommandBuffer>().AsSelf().SingleInstance();
            builder.RegisterType<CommandParser>().AsSelf().SingleInstance();
            builder.RegisterType<ConnectionManager>().AsSelf().SingleInstance();
            builder.RegisterType<CardRepository>().AsSelf().SingleInstance();
            builder.RegisterType<RequestsHandler>().AsSelf().SingleInstance();

            builder.RegisterAssemblyTypes(typeof(ServiceProxyBase).Assembly).Where(i => i.IsSubclassOf(typeof(ServiceProxyBase))).AsSelf().SingleInstance();
            builder.RegisterAssemblyTypes(typeof(ManagerBase).Assembly).Where(i => i.IsSubclassOf(typeof(ManagerBase))).AsSelf().SingleInstance();

            builder.RegisterType<AboNavigationManager>().As<NavigationManagerBase>().SingleInstance();
            builder.RegisterType<PopupController>().AsSelf().SingleInstance();
            builder.RegisterType<ToastNotificator>().AsSelf().SingleInstance();

            _navigationBuilder
                .RegisterViewModel<FrameViewModel>().StaticResource().WithoutView()
                .RegisterViewModel<LoginViewModel>().Singleton().ForView<LoginPage>()
                .RegisterViewModel<ChatOnlineHubViewModel>().WithoutView()
                .RegisterViewModel<BlacklistViewModel>().WithoutView()
                .RegisterViewModel<FriendsViewModel>().WithoutView()
                .RegisterViewModel<HallOfFameViewModel>().WithoutView()
                .RegisterViewModel<PlayersOnlineHubViewModel>().WithoutView()
                .RegisterViewModel<SearchPlayersViewModel>().WithoutView()
                .RegisterViewModel<ChatOnlineHubViewModel>().WithoutView()
                .RegisterViewModel<OnlineProfileViewModel>().WithoutView()
                .RegisterViewModel<RegistrationViewModel>().Singleton().ForView<RegistrationPage>()
                .RegisterViewModel<CardsCatalogViewModel>().ForView<CardsCatalogPage>()
                .RegisterViewModel<MainMenuViewModel>().Singleton().ForView<MainMenuPage>()
                .RegisterViewModel<SinglePlayerViewModel>().ForView<SinglePlayerOptionsPage>()
                .RegisterViewModel<OnlinePlayerDetailsViewModel>().Singleton().ForView<OnlinePlayerDetails>()
                .RegisterViewModel<PhotoSelectorViewModel>().Singleton().ForView<PhotoSelectionView>()
                .RegisterViewModel<AggregatedOnlineHubViewModel>().ForView<OnlineHubPage>()
                .RegisterViewModel<InputTextViewModel>().ForView<InputTextView>();
        }
        protected override void OnMap(ContainerBuilder builder)
        {
            _navigationBuilder = new NavigationBuilder(new ContainerBuilderAdapter(builder));
            builder.RegisterInstance(_navigationBuilder).SingleInstance();

            builder.RegisterType<AgentsController>().SingleInstance();
            builder.RegisterType<VoipTranslatorNavigator>().As<NavigationManagerBase>().SingleInstance();
            builder.RegisterType<KeyValueStorage>().As<IKeyValueStorage>().SingleInstance();
            builder.RegisterType<Dispatcher>().As<IUIDispatcher>().SingleInstance();
            builder.RegisterType<TransportResource>().As<ITransportResource>().SingleInstance();
            builder.RegisterType<PhoneLogger>().As<ILogger>().SingleInstance();
            builder.RegisterType<AudioDeviceResource>().As<IAudioDeviceResource>().SingleInstance();
            builder.RegisterType<DeviceInfoProvider>().As<IDeviceInfoProvider>().SingleInstance();

            _navigationBuilder
                .RegisterViewModel<RegistrationViewModel>().ForView<RegistrationPage>()
                .RegisterViewModel<MainViewModel>().Singleton().ForView<MainPage>()
                .RegisterViewModel<FrameViewModel>().StaticResource().WithoutView()
                .RegisterViewModel<KeypadViewModel>().StaticResource().WithoutView()
                .RegisterViewModel<CallViewModel>().StaticResource().WithoutView()
                ;

            base.OnMap(builder);
        }
Ejemplo n.º 4
0
        protected override void OnMap(ContainerBuilder builder)
        {
            _navigationBuilder = new NavigationBuilder(new ContainerBuilderAdapter(builder));
            builder.RegisterInstance(_navigationBuilder).SingleInstance();

            builder.RegisterType <AgentsController>().SingleInstance();
            builder.RegisterType <VoipTranslatorNavigator>().As <NavigationManagerBase>().SingleInstance();
            builder.RegisterType <KeyValueStorage>().As <IKeyValueStorage>().SingleInstance();
            builder.RegisterType <Dispatcher>().As <IUIDispatcher>().SingleInstance();
            builder.RegisterType <TransportResource>().As <ITransportResource>().SingleInstance();
            builder.RegisterType <PhoneLogger>().As <ILogger>().SingleInstance();
            builder.RegisterType <AudioDeviceResource>().As <IAudioDeviceResource>().SingleInstance();
            builder.RegisterType <DeviceInfoProvider>().As <IDeviceInfoProvider>().SingleInstance();

            _navigationBuilder
            .RegisterViewModel <RegistrationViewModel>().ForView <RegistrationPage>()
            .RegisterViewModel <MainViewModel>().Singleton().ForView <MainPage>()
            .RegisterViewModel <FrameViewModel>().StaticResource().WithoutView()
            .RegisterViewModel <KeypadViewModel>().StaticResource().WithoutView()
            .RegisterViewModel <CallViewModel>().StaticResource().WithoutView()
            ;

            base.OnMap(builder);
        }