private MvxSourceStepFactory SetupSourceStepFactory() { ClearAll(); MvxBindingSingletonCache.Initialize(); var autoValueConverters = new MvxAutoValueConverters(); Ioc.RegisterSingleton <IMvxAutoValueConverters>(autoValueConverters); var sourcePropertyParser = new MvxSourcePropertyPathParser(); Ioc.RegisterSingleton <IMvxSourcePropertyPathParser>(sourcePropertyParser); var realSourceBindingFactory = new MvxSourceBindingFactory(); Ioc.RegisterSingleton <IMvxSourceBindingFactory>(realSourceBindingFactory); var sourceStepFactory = new MvxSourceStepFactory(); sourceStepFactory.AddOrOverwrite(typeof(MvxPathSourceStepDescription), new MvxPathSourceStepFactory()); sourceStepFactory.AddOrOverwrite(typeof(MvxLiteralSourceStepDescription), new MvxLiteralSourceStepFactory()); sourceStepFactory.AddOrOverwrite(typeof(MvxCombinerSourceStepDescription), new MvxCombinerSourceStepFactory()); Ioc.RegisterSingleton <IMvxSourceStepFactory>(sourceStepFactory); var propertySource = new MvxPropertySourceBindingFactoryExtension(); realSourceBindingFactory.Extensions.Add(propertySource); return(sourceStepFactory); }
public ObservableBindingTest() { base.Setup(); var factory = new MvxSourceBindingFactory { Extensions = { new ObservableMvxPropertySourceBindingFactoryExtension(), new MvxPropertySourceBindingFactoryExtension() } }; base.Ioc.RegisterSingleton <IMvxSourceBindingFactory>(factory); base.Ioc.RegisterSingleton <IMvxSourcePropertyPathParser>(new MvxSourcePropertyPathParser()); }
protected virtual void RegisterSourceFactory() { var sourceFactory = new MvxSourceBindingFactory(); this.RegisterServiceInstance <IMvxSourceBindingFactory>(sourceFactory); }
protected virtual void RegisterSourceFactory() { var sourceFactory = new MvxSourceBindingFactory(); Mvx.RegisterSingleton <IMvxSourceBindingFactory>(sourceFactory); }