public AttributePropertyInjectionBehavior(
     IPropertySelectionBehavior baseBehavior,
     Type attributeType)
 {
     this.behavior  = baseBehavior;
     this.attribute = attributeType;
 }
Exemple #2
0
 /// <summary>Initializes a new instance of the <see cref="ContainerOptions"/> class.</summary>
 public ContainerOptions()
 {
     this.resolutionBehavior   = new DefaultConstructorResolutionBehavior();
     this.verificationBehavior = new DefaultConstructorVerificationBehavior();
     this.injectionBehavior    = new DefaultConstructorInjectionBehavior(() => this.Container);
     this.propertyBehavior     = new DefaultPropertySelectionBehavior();
     this.lifestyleBehavior    = new TransientLifestyleSelectionBehavior();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="WebFormsPropertySelectionBehavior"/> class.
        /// </summary>
        /// <param name="baseBehavior">The original behavior that this instance wraps.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="baseBehavior"/> is a null
        /// reference (Nothing in VB).</exception>
        public WebFormsPropertySelectionBehavior(IPropertySelectionBehavior baseBehavior)
        {
            if (baseBehavior == null)
            {
                throw new ArgumentNullException(nameof(baseBehavior));
            }

            this.baseBehavior = baseBehavior;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="WebFormsPropertySelectionBehavior"/> class.
        /// </summary>
        /// <param name="baseBehavior">The original behavior that this instance wraps.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="baseBehavior"/> is a null
        /// reference (Nothing in VB).</exception>
        public WebFormsPropertySelectionBehavior(IPropertySelectionBehavior baseBehavior)
        {
            if (baseBehavior == null)
            {
                throw new ArgumentNullException(nameof(baseBehavior));
            }

            this.baseBehavior = baseBehavior;
        }
        internal ContainerOptions(Container container)
        {
            Requires.IsNotNull(container, nameof(container));

            this.Container          = container;
            this.resolutionBehavior = new DefaultConstructorResolutionBehavior();
            this.injectionBehavior  = new DefaultDependencyInjectionBehavior(container);
            this.propertyBehavior   = new DefaultPropertySelectionBehavior();
            this.lifestyleBehavior  = new DefaultLifestyleSelectionBehavior(this);
        }
        internal ContainerOptions(Container container)
        {
            Requires.IsNotNull(container, "container");

            this.Container                 = container;
            this.resolutionBehavior        = new DefaultConstructorResolutionBehavior();
            this.injectionBehavior         = new DefaultDependencyInjectionBehavior(container);
            this.propertyBehavior          = new DefaultPropertySelectionBehavior();
            this.lifestyleBehavior         = new DefaultLifestyleSelectionBehavior(Lifestyle.Transient);
            this.batchRegistrationBehavior = new DefaultBatchRegistrationBehavior(container);
        }
Exemple #7
0
 public static bool SelectProperty(this IPropertySelectionBehavior behavior,
                                   Type serviceType, PropertyInfo propertyInfo)
 {
     throw new NotSupportedException(PropertySelectionBehaviorObsoleteMessage);
 }
 internal ImplicitPropertyInjectionBehavior(IPropertySelectionBehavior core,
     ContainerOptions options)
 {
     this.core = core;
     this.options = options;
 }
 internal ImplicitPropertyInjectionBehavior(Container container)
 {
     this.options  = container.Options;
     this.original = container.Options.PropertySelectionBehavior;
 }
 internal PropertyInjectionBehavior(Container container)
 {
     containerOptions          = container.Options;
     propertySelectionBehavior = container.Options.PropertySelectionBehavior;
 }
 internal PropertyRegistrations(IPropertySelectionBehavior baseBehavior)
 {
     this.baseBehavior = baseBehavior;
 }
Exemple #12
0
 internal ImplicitPropertyInjectionBehavior(IPropertySelectionBehavior core,
                                            ContainerOptions options)
 {
     this.core    = core;
     this.options = options;
 }
        internal ContainerOptions(Container container)
        {
            Requires.IsNotNull(container, nameof(container));

            this.Container = container;
            this.resolutionBehavior = new DefaultConstructorResolutionBehavior();
            this.injectionBehavior = new DefaultDependencyInjectionBehavior(container);
            this.propertyBehavior = new DefaultPropertySelectionBehavior();
            this.lifestyleBehavior = new DefaultLifestyleSelectionBehavior(Lifestyle.Transient);
        }
 public AttributePropertyInjectionBehavior(IPropertySelectionBehavior baseBehavior)
 {
     this.baseBehavior = baseBehavior;
 }