Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NinjectObjectBuilder"/> class.
        /// </summary>
        /// <remarks>
        /// Uses the default object builder property <see cref="propertyHeuristic"/> 
        /// <see cref="ObjectBuilderPropertyHeuristic"/>.
        /// </remarks>
        /// <param name="kernel">
        /// The kernel.
        /// </param>
        public NinjectObjectBuilder(IKernel kernel)
        {
            this.kernel = kernel;

            this.RegisterNecessaryBindings();

            this.propertyHeuristic = this.kernel.Get<IObjectBuilderPropertyHeuristic>();

            this.AddCustomPropertyInjectionHeuristic();

            this.ReplacePropertyInjectionStrategyWithCustomPropertyInjectionStrategy();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NinjectObjectBuilder"/> class.
        /// </summary>
        /// <remarks>
        /// Uses the default object builder property <see cref="propertyHeuristic"/>
        /// <see cref="ObjectBuilderPropertyHeuristic"/>.
        /// </remarks>
        /// <param name="kernel">
        /// The kernel.
        /// </param>
        public NinjectObjectBuilder(IKernel kernel)
        {
            this.kernel = kernel;

            this.RegisterNecessaryBindings();

            this.propertyHeuristic = this.kernel.Get <IObjectBuilderPropertyHeuristic>();

            this.AddCustomPropertyInjectionHeuristic();

            this.ReplacePropertyInjectionStrategyWithCustomPropertyInjectionStrategy();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NinjectObjectBuilder"/> class.
        /// </summary>
        /// <remarks>
        /// Uses the default object builder property <see cref="propertyHeuristic"/>
        /// <see cref="ObjectBuilderPropertyHeuristic"/>.
        /// </remarks>
        /// <param name="kernel">
        /// The kernel.
        /// </param>
        public NinjectObjectBuilder(IKernel kernel)
        {
            this.kernel = kernel;

            this.RegisterNecessaryBindings();

            this.propertyHeuristic = this.kernel.Get <IObjectBuilderPropertyHeuristic>();

            this.AddCustomPropertyInjectionHeuristic();

            this.kernel.Bind <NinjectChildContainer>().ToSelf().Named("Container").DefinesNamedScope("Container");
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NinjectObjectBuilder"/> class.
        /// </summary>
        /// <remarks>
        /// Uses the default object builder property <see cref="propertyHeuristic"/> 
        /// <see cref="ObjectBuilderPropertyHeuristic"/>.
        /// </remarks>
        /// <param name="kernel">
        /// The kernel.
        /// </param>
        public NinjectObjectBuilder(IKernel kernel)
        {
            this.kernel = kernel;

            this.RegisterNecessaryBindings();

            this.propertyHeuristic = this.kernel.Get<IObjectBuilderPropertyHeuristic>();

            this.AddCustomPropertyInjectionHeuristic();

            this.ReplacePropertyInjectionStrategyWithCustomPropertyInjectionStrategy();

            this.kernel.Bind<NinjectChildContainer>().ToSelf().Named("Container").DefinesNamedScope("Container");
        }