/*----------------------------------------------------------------------------------------*/
        /// <summary>
        /// Gets an injector for the specified method.
        /// </summary>
        /// <param name="method">The method that the injector will invoke.</param>
        /// <returns>A new injector for the method.</returns>
        public IMethodInjector GetInjector(MethodInfo method)
        {
            lock (_methodInjectors)
            {
                if (method.IsGenericMethodDefinition)
                {
                    throw new InvalidOperationException(ExceptionFormatter.CannotCreateInjectorFromGenericTypeDefinition(method));
                }

                if (_methodInjectors.ContainsKey(method))
                {
                    return(_methodInjectors[method]);
                }

                IMethodInjector injector = CreateInjector(method);
                _methodInjectors.Add(method, injector);

                return(injector);
            }
        }