Пример #1
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);
     }
 }
Пример #2
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;
     }
 }