public virtual void ClearAll(IMvxIocOptions options = null)
 {
     // fake set up of the IoC
     Reset();
     Ioc = MvxIoCProvider.Initialize(options ?? CreateIocOptions());
     Ioc.RegisterSingleton(Ioc);
     CreateLog();
     InitializeSingletonCache();
     InitializeMvxSettings();
     AdditionalSetup();
 }
Пример #2
0
 protected MvxSimpleIoCContainer(IMvxIocOptions options)
 {
     _options = options ?? new MvxIocOptions();
     if (_options.PropertyInjectorType != null)
     {
         _propertyInjector = Activator.CreateInstance(_options.PropertyInjectorType) as IMvxPropertyInjector;
     }
     if (_propertyInjector != null)
     {
         RegisterSingleton(typeof(IMvxPropertyInjector), _propertyInjector);
     }
 }
        public static new IMvxIoCProvider Initialize(IMvxIocOptions options)
        {
            if (Instance != null)
            {
                return(Instance);
            }

            // create a new ioc container - it will register itself as the singleton
            // ReSharper disable ObjectCreationAsStatement
            new MvxPropertyInjectingIoCContainer(options);
            // ReSharper restore ObjectCreationAsStatement
            return(Instance);
        }
        public new static IMvxIoCProvider Initialize(IMvxIocOptions options)
        {
            if (Instance != null)
            {
                return Instance;
            }

            // create a new ioc container - it will register itself as the singleton
            // ReSharper disable ObjectCreationAsStatement
            new MvxPropertyInjectingIoCContainer(options);
            // ReSharper restore ObjectCreationAsStatement
            return Instance;
        }
Пример #5
0
 public MvxIoCContainer(IMvxIocOptions options, IMvxIoCProvider parentProvider = null)
 {
     _options = options ?? new MvxIocOptions();
     if (_options.PropertyInjectorType != null)
     {
         _propertyInjector = Activator.CreateInstance(_options.PropertyInjectorType) as IMvxPropertyInjector;
     }
     if (_propertyInjector != null)
     {
         RegisterSingleton(typeof(IMvxPropertyInjector), _propertyInjector);
     }
     if (parentProvider != null)
     {
         _parentProvider = parentProvider;
     }
 }
 protected MvxPropertyInjectingIoCContainer(IMvxIocOptions options)
     : base(options ?? CreatePropertyInjectionOptions())
 {
 }
 protected MvxPropertyInjectingIoCContainer(IMvxIocOptions options)
     : base(options ?? CreatePropertyInjectionOptions())
 {
 }
Пример #8
0
 protected MvxIoCProvider(IMvxIocOptions options)
 {
     _provider = new MvxIoCContainer(options);
 }
Пример #9
0
 protected virtual IMvxIoCProvider CreateIoCProvider(IMvxIocOptions options = null)
 {
     return(MvxIoCProvider.Initialize(options));
 }