/// <summary> /// Validates this parameter /// </summary> /// <param name="validation">Validation</param> internal override void Validate(SubparameterValidationResult validation) { if (_behavior == null) { validation.AddError("Null behavior."); } else if (_behavior.DelegateType != Type) { validation.AddError("Method no longer of correct type."); } else if (_behavior.Decoration.IsHidden) { validation.AddError("Cannot call hidden method."); } }
/// <summary> /// Validates this parameter /// </summary> /// <param name="validation">Validation</param> internal override void Validate(SubparameterValidationResult validation) { if (Behavior == null) { validation.AddError("Null behavior"); } { Behavior = Behavior.GetFinalDescendant(); if (Type != DelegateType(Behavior.PropertyType)) { validation.AddError("Property no longer of type."); } else if (Behavior.Decoration.IsHidden) { validation.AddError("Cannot get hidden property."); } } }
/// <summary> /// Validates this parameter /// </summary> /// <param name="validation">Validation</param> internal abstract void Validate(SubparameterValidationResult validation);
/// <summary> /// No-op /// </summary> /// <param name="validation"></param> internal override void Validate(SubparameterValidationResult validation) { }
/// <summary> /// Validates this parameter /// </summary> /// <param name="validation">Validation</param> internal override void Validate(SubparameterValidationResult validation) => _base.Validate(validation);