src/GenFx/GeneticComponent.cs
/// <summary>
/// Verifies that the value is a valid value for the property.
/// </summary>
/// <param name="value">Value being set to the property.</param>
/// <param name="propertyInfo">The <see cref="PropertyInfo"/> of the property to validate.</param>
/// <exception cref="ArgumentException"><paramref name="propertyInfo"/> is null.</exception>
/// <exception cref="ArgumentException">Property not found on configuration type.</exception>
/// <exception cref="ValidationException">Property was set to an invalid value.</exception>
Verifies that the value is a valid value for the property.
Verifies that the value is a valid value for the property .
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
        protected void ValidateProperty(object? value, PropertyInfo propertyInfo)
        {
            if (propertyInfo == null)
            {
                throw new ArgumentNullException(nameof(propertyInfo));
            }
            PropertyValidatorAttribute[] attribs = (PropertyValidatorAttribute[])propertyInfo.GetCustomAttributes(typeof(PropertyValidatorAttribute), false);
            for (int i = 0; i < attribs.Length; i++)
            {
                attribs[i].Validator.EnsureIsValid(this.GetType().Name + Type.Delimiter + propertyInfo.Name, value, this);
            }
        }
[ System . Diagnostics . CodeAnalysis . SuppressMessage ( " " , " " ) ] protected void ValidateProperty ( object ? value , PropertyInfo propertyInfo ) { if ( propertyInfo == null ) { throw new ArgumentNullException ( nameof ( propertyInfo ) ) ; } PropertyValidatorAttribute [ ] attribs = ( PropertyValidatorAttribute [ ] ) propertyInfo . GetCustomAttributes ( typeof ( PropertyValidatorAttribute ) , false ) ; for ( int i = 0 ; i < attribs . Length ; i ++ ) { attribs [ i ] . Validator . EnsureIsValid ( this . GetType ( ) . Name + Type . Delimiter + propertyInfo . Name , value , this ) ; } }
Verifies that the value is a valid value for the property.
Verifies that the value is a valid value for the property .
None
Property not found on configuration type.
Property not found on configuration type .
Property was set to an invalid value.
Property was set to an invalid value .
value
object?
Value being set to the property.
Value being set to the property .
propertyInfo
PropertyInfo
The  of the property to validate.
The of the property to validate .