private AutofacMvxIocProvider CreateProvider(IContainer container = null, MvxPropertyInjectorOptions options = null) { if (container == null) { container = new ContainerBuilder().Build(); } var provider = new AutofacMvxIocProvider(container, options ?? new MvxPropertyInjectorOptions()); this._disposables.Add(provider); return(provider); }
protected virtual void ClearAll() { // fake set up of the IoC MvxSingleton.ClearAllSingletons(); var withInject = new MvxPropertyInjectorOptions() { InjectIntoProperties = MvxPropertyInjection.MvxInjectInterfaceProperties, ThrowIfPropertyInjectionFails = true }; var options = new MvxIocOptions { PropertyInjectorOptions = withInject }; _ioc = MvxSimpleIoCContainer.Initialize(options); _ioc.RegisterSingleton(_ioc); InitializeTrace(); InitializeSingletonCache(); InitializeMvxSettings(); MvxTrace.Initialize(); AdditionalSetup(); }