src/GenFx/Validation/ExternalValidatorAttributeHelper.cs
/// <summary>
/// Validates that the arguments are correctly set.
/// </summary>
/// <param name="targetComponentType"><see cref="Type"/> of the component configuration containing the property to be validated.</param>
/// <param name="targetProperty">Property of the <paramref name="targetComponentType"/> to be validated.</param>
/// <exception cref="ArgumentNullException"><paramref name="targetComponentType"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="targetProperty"/> is null or empty.</exception>
/// <exception cref="ArgumentException"><paramref name="targetComponentType"/> does not implement <see cref="GeneticComponent"/>.</exception>
/// <exception cref="ArgumentException"><paramref name="targetProperty"/> does not exist on <paramref name="targetComponentType"/>.</exception>
Validates that the arguments are correctly set.
Validates that the arguments are correctly set .
public static void ValidateArguments(Type targetComponentType, string targetProperty)
        {
            ExternalValidatorAttributeHelper.ValidateArguments(targetComponentType);
            if (String.IsNullOrEmpty(targetProperty))
            {
                throw new ArgumentException(Resources.ErrorMsg_StringNullOrEmpty, nameof(targetProperty));
            }
            if (ExternalValidatorAttributeHelper.GetTargetPropertyInfo(targetComponentType, targetProperty) == null)
            {
                throw new ArgumentException(StringUtil.GetFormattedString(
                    Resources.ErrorMsg_ExternalValidator_PropertyDoesNotExist, targetProperty, targetComponentType.FullName), nameof(targetProperty));
            }
        }
public static void ValidateArguments ( Type targetComponentType , string targetProperty ) { ExternalValidatorAttributeHelper . ValidateArguments ( targetComponentType ) ; if ( String . IsNullOrEmpty ( targetProperty ) ) { throw new ArgumentException ( Resources . ErrorMsg_StringNullOrEmpty , nameof ( targetProperty ) ) ; } if ( ExternalValidatorAttributeHelper . GetTargetPropertyInfo ( targetComponentType , targetProperty ) == null ) { throw new ArgumentException ( StringUtil . GetFormattedString ( Resources . ErrorMsg_ExternalValidator_PropertyDoesNotExist , targetProperty , targetComponentType . FullName ) , nameof ( targetProperty ) ) ; } }
Validates that the arguments are correctly set.
Validates that the arguments are correctly set .
None
None
does not implement .
does not implement .
does not exist on .
does not exist on .
targetComponentType
Type
of the component configuration containing the property to be validated.
of the component configuration containing the property to be validated .
targetProperty
string
Property of the  to be validated.
Property of the to be validated .