void RegisterValidator(Type typeToRegister, IDictionary<Type, List<Type>> validatorRegistry)
{
var validatedType = GetValidatedType(typeToRegister);
if (validatedType == null || validatedType.IsInterface || validatedType.IsAPrimitiveType())
return;
if (validatorRegistry.ContainsKey(validatedType))
{
validatorRegistry[validatedType].Add(typeToRegister);
}
else
{
validatorRegistry.Add(validatedType, new List<Type>() { typeToRegister });
}
}