public Type GetValidatedType(Type collectorType) { ArgumentUtility.CheckNotNull("collectorType", collectorType); if (collectorType.IsDefined(typeof(ApplyWithMixinAttribute), false)) { return(AttributeUtility.GetCustomAttribute <ApplyWithMixinAttribute> (collectorType, false).MixinType); } return(_validatedTypeResolver.GetValidatedType(collectorType)); }
private Type GetValidatedType(Type collectorType) { var type = _validatedTypeResolver.GetValidatedType(collectorType); if (type == null) { throw new InvalidOperationException(string.Format("No validated type could be resolved for collector '{0}'.", collectorType.FullName)); } return(type); }
public Type GetValidatedType(Type collectorType) { ArgumentUtility.CheckNotNull("collectorType", collectorType); if (TypeExtensions.CanAscribeTo(collectorType, typeof(IComponentValidationCollector <>))) { return(TypeExtensions.GetAscribedGenericArguments(collectorType, typeof(IComponentValidationCollector <>)).Single()); } return(_validatedTypeResolver.GetValidatedType(collectorType)); }