Example #1
0
        /// <summary>
        /// Defines a custom builder to use.
        /// </summary>
        /// <param name="definitionType">The type of the <see cref="ContainerDefinition" />.</param>
        public void UseContainer(Type definitionType)
        {
            Guard.AgainstNull(nameof(definitionType), definitionType);
            Guard.TypeHasDefaultConstructor(definitionType, nameof(definitionType));

            ContainerComponent.UseContainer(definitionType);
        }
Example #2
0
 /// <summary>
 /// Defines a custom builder to use.
 /// </summary>
 /// <typeparam name="T">The builder type of the <see cref="ContainerDefinition" />.</typeparam>
 public void UseContainer <T>(Action <ContainerCustomizations> customizations = null) where T : ContainerDefinition, new()
 {
     ContainerComponent.UseContainer <T>(customizations);
 }
Example #3
0
        /// <summary>
        /// Uses an already active instance of a builder.
        /// </summary>
        /// <param name="builder">The instance to use.</param>
        public void UseContainer(IContainer builder)
        {
            Guard.AgainstNull(nameof(builder), builder);

            ContainerComponent.UseContainer(builder);
        }