/// <summary>
        /// Initializes a new instance of the <see cref="AutofacMvxIocProvider"/> class.
        /// </summary>
        /// <param name="container">
        /// The container from which dependencies should be resolved.
        /// </param>
        /// <param name="propertyInjectorOptions">
        /// An <see cref="IAutofacPropertyInjectorOptions"/> that defines how property
        /// injection should be handled.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="container"/> or <paramref name="propertyInjectorOptions" /> is <see langword="null"/>.
        /// </exception>
        public AutofacMvxIocProvider(IContainer container, IAutofacPropertyInjectorOptions propertyInjectorOptions)
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            if (propertyInjectorOptions == null)
            {
                throw new ArgumentNullException(nameof(propertyInjectorOptions));
            }

            this.Container = container;
            this.PropertyInjectorOptions = propertyInjectorOptions;
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutofacMvxIocProvider"/> class.
 /// </summary>
 /// <param name="container">
 /// The container from which dependencies should be resolved.
 /// </param>
 /// <param name="propertyInjectorOptions">
 /// An <see cref="IAutofacPropertyInjectorOptions"/> that defines how property
 /// injection should be handled.
 /// </param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown if <paramref name="container"/> or <paramref name="propertyInjectorOptions" /> is <see langword="null"/>.
 /// </exception>
 public AutofacMvxIocProvider(ILifetimeScope container, IAutofacPropertyInjectorOptions propertyInjectorOptions)
     : this(container, (IMvxPropertyInjectorOptions)propertyInjectorOptions)
 {
 }