Esempio n. 1
0
        /// <summary>
        /// Creates a new StandardBinding.
        /// </summary>
        /// <param name="kernel">The kernel that is creating the binding.</param>
        /// <param name="service">The service type to bind from.</param>
        public StandardBinding(IKernel kernel, Type service)
        {
            Ensure.ArgumentNotNull(kernel, "kernel");
            Ensure.ArgumentNotNull(service, "service");

            Kernel = kernel;
            Service = service;

            Heuristics = new HeuristicCollection();
            Parameters = new ParameterCollection();
            Components = new StandardComponentContainer(kernel, kernel.Components);
        }
Esempio n. 2
0
		/*----------------------------------------------------------------------------------------*/
		#region Constructors
		/// <summary>
		/// Creates a new StandardBinding.
		/// </summary>
		/// <param name="kernel">The kernel that is creating the binding.</param>
		/// <param name="service">The service type to bind from.</param>
		public StandardBinding(IKernel kernel, Type service)
		{
			Ensure.ArgumentNotNull(kernel, "kernel");
			Ensure.ArgumentNotNull(service, "service");

			Kernel = kernel;
			Service = service;

			Heuristics = new HeuristicCollection();
			Parameters = new ParameterCollection();
			Components = new StandardComponentContainer(kernel, kernel.Components);
		}