public void EnsureInitialized(Context applicationContext) { if (MvxSimpleIoCContainer.Instance != null) return; var ioc = MvxSimpleIoCContainer.Initialise(); ioc.RegisterSingleton<IMvxPluginManager>(new MvxFilePluginManager(".Droid", ".dll")); ioc.RegisterSingleton<IMvxAndroidGlobals>(new AndroidGlobals(applicationContext, GetType().Namespace)); var topActivity = new AndroidTopActivity(); ioc.RegisterSingleton<ITopActivity>(topActivity); ioc.RegisterSingleton<IMvxMainThreadDispatcher>(topActivity); var builder = new MvxAndroidBindingBuilder(); builder.DoRegistration(); var viewCache = ioc.Resolve<IMvxTypeCache<View>>(); viewCache.AddAssembly(typeof(View).Assembly); var namespaces = ioc.Resolve<IMvxNamespaceListViewTypeResolver>(); namespaces.Add("Android.Views"); namespaces.Add("Android.Widget"); namespaces.Add("Android.Webkit"); }
public void EnsureInitialized(Context context) { if (MvxSimpleIoCContainer.Instance != null) return; ApplicationContext = context; MvxSimpleIoCContainer.Initialize(); Mvx.RegisterSingleton<IMvxAndroidGlobals>(this); var plugin = new MvxFilePluginManager(".Droid", ".dll"); Mvx.RegisterSingleton<IMvxPluginManager>(plugin); var builder = new MvxAndroidBindingBuilder(); builder.DoRegistration(); var viewCache = Mvx.Resolve<IMvxTypeCache<View>>(); viewCache.AddAssembly(typeof(Android.Widget.LinearLayout).Assembly); var valueConverterRegistry = Mvx.Resolve<IMvxValueConverterRegistry>(); valueConverterRegistry.AddOrOverwrite("TheLengthConverter", new LengthValueConverter()); var locationBootstrap = new LocationPluginBootstrap(); locationBootstrap.Run(); }
public void EnsureInitialized(Context applicationContext) { if (MvxSimpleIoCContainer.Instance != null) return; var ioc = MvxSimpleIoCContainer.Initialise(); ioc.RegisterSingleton<IMvxTrace>(new MvxDebugOnlyTrace()); ioc.RegisterSingleton<IMvxPluginManager>(new MvxFilePluginManager(".Droid", ".dll")); ioc.RegisterSingleton<IMvxAndroidGlobals>(new AndroidGlobals(applicationContext)); var topActivity = new AndroidTopActivity(); ioc.RegisterSingleton<ITopActivity>(topActivity); ioc.RegisterSingleton<IMvxAndroidCurrentTopActivity>(topActivity); ioc.RegisterSingleton<IMvxMainThreadDispatcher>(topActivity); var builder = new MvxAndroidBindingBuilder(ignored => { }, ignored => { }, ignored => { }); builder.DoRegistration(); }
public void EnsureInitialized(Context applicationContext) { if (MvxSimpleIoCContainer.Instance != null) return; var ioc = MvxSimpleIoCContainer.Initialize(); ioc.RegisterSingleton<IMvxTrace>(new MvxDebugOnlyTrace()); MvxTrace.Initialize(); ioc.RegisterSingleton<IMvxAndroidGlobals>(new AndroidGlobals(applicationContext)); var builder = new MvxAndroidBindingBuilder(); builder.DoRegistration(); var viewCache = ioc.Resolve<IMvxTypeCache<View>>(); viewCache.AddAssembly(typeof(View).Assembly); var namespaces = ioc.Resolve<IMvxNamespaceListViewTypeResolver>(); namespaces.Add("Android.Views"); namespaces.Add("Android.Widget"); namespaces.Add("Android.Webkit"); }
protected virtual MvxAndroidBindingBuilder CreateBindingBuilder() { var bindingBuilder = new MvxAndroidBindingBuilder(FillTargetFactories, FillValueConverters, FillBindingNames, SetupViewTypeResolver); return bindingBuilder; }
protected virtual MvxAndroidBindingBuilder CreateBindingBuilder() { var bindingBuilder = new MvxAndroidBindingBuilder(); return bindingBuilder; }