/// <summary>
        /// Return a <see cref="IResolverPolicy"/> instance that will
        /// return this types value for the parameter.
        /// </summary>
        /// <param name="type">Type that contains the member that needs this parameter. Used
        /// to resolve open generic parameters.</param>
        /// <returns>The <see cref="IResolverPolicy"/>.</returns>
        public override IResolverPolicy GetResolverPolicy(Type type)
        {
            var typeToBuild = type ?? throw new ArgumentNullException(nameof(type));

            if (ParameterType.IsArray && ParameterType.GetElementType().GetTypeInfo().IsGenericParameter)
            {
                Type arrayType = ParameterType.GetClosedParameterType(typeToBuild.GetTypeInfo().GenericTypeArguments);
                return(new NamedTypeDependencyResolverPolicy(arrayType, _name));
            }

            var info = ParameterType.GetTypeInfo();

            if (info.IsGenericType && info.ContainsGenericParameters || ParameterType.IsGenericParameter)
            {
                return(new NamedTypeDependencyResolverPolicy(
                           ParameterType.GetClosedParameterType(typeToBuild.GetTypeInfo().GenericTypeArguments), _name));
            }

            return(new NamedTypeDependencyResolverPolicy(ParameterType, _name));
        }