/// <summary>
        /// Add policies to the <paramref name="policies"/> to configure the
        ///             container to call this constructor with the appropriate parameter values.
        /// </summary>
        /// <param name="serviceType">Type of interface being registered. If no interface,
        ///             this will be null.</param><param name="implementationType">Type of concrete type being registered.</param><param name="name">Name used to resolve the type object.</param><param name="policies">Policy list to add policies to.</param>
        public override void AddPolicies(Type serviceType, Type implementationType, string name, IPolicyList policies)
        {
            if (implementationType == null) throw new ArgumentNullException("implementationType");

            if(!implementationType.IsGenericType ||
                implementationType.GetGenericTypeDefinition() != typeof(Validator<>))
            {
                throw new InvalidOperationException(Resources.IllegalUseOfInjectionValidationSource);
            }

            var key = new NamedTypeBuildKey(implementationType, name);
            var policy = new ValidationSpecificationSourcePolicy(Source);

            policies.Set<ValidationSpecificationSourcePolicy>(policy, key);
        }
        /// <summary>
        /// Add policies to the <paramref name="policies"/> to configure the
        ///             container to call this constructor with the appropriate parameter values.
        /// </summary>
        /// <param name="serviceType">Type of interface being registered. If no interface,
        ///             this will be null.</param><param name="implementationType">Type of concrete type being registered.</param><param name="name">Name used to resolve the type object.</param><param name="policies">Policy list to add policies to.</param>
        public override void AddPolicies(Type serviceType, Type implementationType, string name, IPolicyList policies)
        {
            if (implementationType == null)
            {
                throw new ArgumentNullException("implementationType");
            }

            if (!implementationType.IsGenericType ||
                implementationType.GetGenericTypeDefinition() != typeof(Validator <>))
            {
                throw new InvalidOperationException(Resources.IllegalUseOfInjectionValidationSource);
            }

            var key    = new NamedTypeBuildKey(implementationType, name);
            var policy = new ValidationSpecificationSourcePolicy(Source);

            policies.Set <ValidationSpecificationSourcePolicy>(policy, key);
        }