Ejemplo n.º 1
0
        /// <inheritdoc />
        public IReadOnlyKernel BuildReadOnlyKernel()
        {
            var readonlyKernel = new ReadOnlyKernel(
                this.bindings.Clone(),
                this.Components.Get <ICache>(),
                this.Components.Get <IPlanner>(),
                this.Components.Get <IPipeline>(),
                this.Components.Get <IBindingPrecedenceComparer>(),
                this.Components.GetAll <IBindingResolver>().ToList(),
                this.Components.GetAll <IMissingBindingResolver>().ToList(),
                this.settings.Clone(),
                this.Components.Get <ISelector>());

            return(readonlyKernel);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the readonly kernel.
        /// </summary>
        /// <returns>The readonly kernel.</returns>
        public IReadOnlyKernel BuildReadOnlyKernel()
        {
            var readonlyKernel = new ReadOnlyKernel(
                this.Settings,
                this.bindings.Clone(new ReferenceEqualityTypeComparer()),
                this.Components.Get <ICache>(),
                this.Components.Get <IPlanner>(),
                this.Components.Get <IConstructorScorer>(),
                this.Components.Get <IPipeline>(),
                this.Components.Get <IExceptionFormatter>(),
                this.Components.Get <IBindingPrecedenceComparer>(),
                this.Components.GetAll <IBindingResolver>().ToList(),
                this.Components.GetAll <IMissingBindingResolver>().ToList());

            return(readonlyKernel);
        }