/// <summary>
        /// Initializes a new instance of the <see cref="CachedContainerCompiler"/> class.
        /// </summary>
        /// <param name="compiler">The container compiler implementation.</param>
        internal CachedContainerCompiler(IContainerCompiler compiler)
        {
            if (compiler == null)
                throw new ArgumentNullException("compiler");

            _compiler = compiler;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CachedContainerCompiler"/> class.
        /// </summary>
        /// <param name="compiler">The container compiler implementation.</param>
        internal CachedContainerCompiler(IContainerCompiler compiler)
        {
            if (compiler == null)
            {
                throw new ArgumentNullException("compiler");
            }

            _compiler = compiler;
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DependencyMap"/> class.
        /// </summary>
        /// <param name="constructorResolver">The resolver that will be used to determine the constructor that will be used to instantiate a given object instance.</param>
        /// <param name="compiler">The compiler that will be used to compile this map into an IOC container.</param>
        public DependencyMap(IConstructorResolver constructorResolver, IContainerCompiler compiler)
        {
            if (compiler == null)
            {
                throw new ArgumentNullException("compiler");
            }

            if (constructorResolver == null)
            {
                throw new ArgumentNullException("constructorResolver");
            }

            _constructorResolver = constructorResolver;

            ContainerCompiler = compiler;

            // Allow the container to introduce itself to the types that it instantiates
            var dependency = new Dependency(typeof(IMicroContainer));

            AddService(dependency, new ContainerInstanceCall());
        }
Beispiel #4
0
 internal DefaultDependencyMapper(IContainerCompiler compiler)
 {
     this.compiler = compiler;
     dependencies  = new Dictionary <Type, IDependency>();
 }