﻿using Microsoft.Practices.Unity;
using PoliceDispatcher.Services;
using PoliceDispatcher.Views;
using Prism.Unity;

namespace PoliceDispatcher
{
    public partial class App
    {
        public App(IPlatformInitializer initializer = null) : base(initializer)
        {
        }

        protected override void OnInitialized()
        {
            InitializeComponent();
            NavigationService.NavigateAsync("Login");
        }

        protected override void RegisterTypes()
        {
            Container.RegisterType<IEventAggregatorExposed, EventAggregarotExposed>(new ContainerControlledLifetimeManager());
            Container.RegisterType<IReportService, ReportService>();

            Container.RegisterTypeForNavigation<MainPage>();
            Container.RegisterTypeForNavigation<Login>();
        }
    }
}