Ejemplo n.º 1
0
 /// <summary>
 ///   Assign a new implementation which will take care of the registration.
 /// </summary>
 /// <param name="registrar"> </param>
 public static void Assign(IComponentRegistrar registrar)
 {
     if (registrar == null)
     {
         throw new ArgumentNullException("registrar");
     }
     _registrar = registrar;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigurationRegistrar"/> class.
        /// </summary>
        /// <param name="componentRegistrar">
        /// The <see cref="IComponentRegistrar"/> that will be used to parse
        /// configuration values into component registrations.
        /// </param>
        /// <param name="moduleRegistrar">
        /// The <see cref="IModuleRegistrar"/> that will be used to parse
        /// configuration values into module registrations.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="componentRegistrar" /> or <paramref name="moduleRegistrar" /> is <see langword="null" />.
        /// </exception>
        public ConfigurationRegistrar(IComponentRegistrar componentRegistrar, IModuleRegistrar moduleRegistrar)
        {
            if (componentRegistrar == null)
            {
                throw new ArgumentNullException("componentRegistrar");
            }

            if (moduleRegistrar == null)
            {
                throw new ArgumentNullException("moduleRegistrar");
            }

            this.ComponentRegistrar = componentRegistrar;
            this.ModuleRegistrar    = moduleRegistrar;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigurationRegistrar"/> class.
        /// </summary>
        /// <param name="componentRegistrar">
        /// The <see cref="IComponentRegistrar"/> that will be used to parse
        /// configuration values into component registrations.
        /// </param>
        /// <param name="moduleRegistrar">
        /// The <see cref="IModuleRegistrar"/> that will be used to parse
        /// configuration values into module registrations.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="componentRegistrar" /> or <paramref name="moduleRegistrar" /> is <see langword="null" />.
        /// </exception>
        public ConfigurationRegistrar(IComponentRegistrar componentRegistrar, IModuleRegistrar moduleRegistrar)
        {
            if (componentRegistrar == null)
            {
                throw new ArgumentNullException("componentRegistrar");
            }

            if (moduleRegistrar == null)
            {
                throw new ArgumentNullException("moduleRegistrar");
            }

            this.ComponentRegistrar = componentRegistrar;
            this.ModuleRegistrar = moduleRegistrar;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigurationRegistrar"/> class.
 /// </summary>
 /// <param name="componentRegistrar">
 /// The <see cref="IComponentRegistrar"/> that will be used to parse
 /// configuration values into component registrations.
 /// </param>
 /// <param name="moduleRegistrar">
 /// The <see cref="IModuleRegistrar"/> that will be used to parse
 /// configuration values into module registrations.
 /// </param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown if <paramref name="componentRegistrar" /> or <paramref name="moduleRegistrar" /> is <see langword="null" />.
 /// </exception>
 public ConfigurationRegistrar(IComponentRegistrar componentRegistrar, IModuleRegistrar moduleRegistrar)
 {
     this.ComponentRegistrar = componentRegistrar ?? throw new ArgumentNullException(nameof(componentRegistrar));
     this.ModuleRegistrar    = moduleRegistrar ?? throw new ArgumentNullException(nameof(moduleRegistrar));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Custom constructor that can be used to assign a custom IComponentRegistrar
 /// </summary>
 /// <param name="httpApp"></param>
 /// <param name="componentRegistrar"></param>
 /// <param name="settings"></param>
 public RebelContainerBuilder(TWebApp httpApp, IComponentRegistrar componentRegistrar, RebelSettings settings)
 {
     _httpApp            = httpApp;
     _componentRegistrar = componentRegistrar;
     _settings           = settings;
 }
 public AutoDIBuilder(IComponentRegistrar registrar, List <Assembly> assemblies)
 {
     _registrar  = registrar;
     _assemblies = assemblies;
 }
 /// <summary>
 /// Custom constructor that can be used to assign a custom IComponentRegistrar
 /// </summary>
 /// <param name="httpApp"></param>
 /// <param name="componentRegistrar"></param>
 /// <param name="settings"></param>
 public UmbracoContainerBuilder(TWebApp httpApp, IComponentRegistrar componentRegistrar, UmbracoSettings settings)
 {
     _httpApp            = httpApp;
     _componentRegistrar = componentRegistrar;
     _settings           = settings;
 }
Ejemplo n.º 8
0
 /// <summary>
 ///   Assign a new implementation which will take care of the registration.
 /// </summary>
 /// <param name="registrar"> </param>
 public static void Assign(IComponentRegistrar registrar)
 {
     if (registrar == null) throw new ArgumentNullException("registrar");
     _registrar = registrar;
 }