public static void InitializeAutoFac() { var _containerBuilder = new ContainerBuilder(); //_containerBuilder.RegisterType<ChromeCustomTabsBrowser>(); _containerBuilder.RegisterType <TokenService>(); _containerBuilder.RegisterType <GuiMiGoommaServices>(); _containerBuilder.RegisterType <MainShell>(); _containerBuilder.RegisterAssemblyTypes(typeof(App).Assembly).Where(x => x.IsSubclassOf(typeof(BaseViewM))); var container = _containerBuilder.Build(); MyResolver.Initialize(container); }
public App() { InitializeComponent(); MyBoostrapper.InitializeAutoFac(); MainPage = MyResolver.Resolve <MainShell>(); }