0

using MvvmCross.IoC;
using Countr.Core.ViewModels;
using Countr.Core.Services;
using MvvmCross;
using MvvmCross.ViewModels;
using System.Linq;

namespace Countr.Core
{
    public class App : MvxApplication
    {
        public override void Initialize()
        {
            CreatableTypes()
                .EndingWith("Service")
                .AsInterfaces()
                .RegisterAsLazySingleton();

            CreatableTypes()
                .EndingWith("Repository")
                .AsInterfaces()
                .RegisterAsLazySingleton();

         var x = new MediaManagerService();
         var y = this.CreatableTypes().FirstOrDefault(t => t.Name == "MediaManagerService");
         var z = Mvx.IoCProvider.Resolve<IMediaManagerService>();

            RegisterAppStart<ArticlesViewModel>();
        }
    }
}

|

1

0

|
  • 1