using System; using Aurora.Design.Views.Main; using Aurora.Design.Views.Albums; using Aurora.Design.Views.Artists; using Aurora.Design.Views.Party; using Aurora.Design.Views.Profile; using Aurora.Design.Views.Songs; using Aurora.Design.Views.Stations; using Aurora.Services.EventManager; using Aurora.Services.Server; using Aurora.Services.Client; using Autofac; using LibVLCSharp.Shared; using Xamarin.Forms; using Aurora.Services.Player; using Aurora.Services.Settings; using Aurora.Services.Library; namespace Aurora { public partial class App : Application { private static IContainer _container; public App() { InitializeComponent(); Core.Initialize(); //Register DI ContainerBuilder _builder = new ContainerBuilder(); // _builder.RegisterInstance(new PlayerService()).SingleInstance(); _builder.RegisterType().As().SingleInstance(); _builder.RegisterType().As().SingleInstance(); _builder.RegisterType().As().SingleInstance(); _builder.RegisterType().As().SingleInstance(); _builder.RegisterType().As().SingleInstance(); _builder.RegisterType().As().SingleInstance(); _builder.RegisterType().SingleInstance(); _builder.RegisterType(); _builder.RegisterType(); _builder.RegisterType(); _builder.RegisterType(); _builder.RegisterType(); _builder.RegisterType(); // _builder.RegisterInstance(new SettingsService()).SingleInstance(); _container = _builder.Build(); MainPage = _container.Resolve(); } public static IContainer Container { get { return _container; } } protected override void OnStart() { // Handle when your app starts } protected override void OnSleep() { // Handle when your app sleeps } protected override void OnResume() { // Handle when your app resumes } } }