/// <summary>
 /// Validates this method.
 /// </summary>
 /// <param name="validation">Validation</param>
 internal override void Validate(MethodValidationResult validation)
 {
     if (_componentMethod == null)
     {
         validation.AddError($"{_name} has no component method.");
     }
     else if (_componentMethod.DeclaringType != _componentType)
     {
         validation.AddError($"{_name} is not declared by the type {_componentType}");
     }
 }
 /// <summary>
 /// Validates this method
 /// </summary>
 /// <param name="validation">Validation</param>
 internal override void Validate(MethodValidationResult validation)
 {
     foreach (var p in _params)
     {
         p.Validate(validation.ValidateSubparameter(p.Type, p.ToString()));
     }
     if (_invoke == null)
     {
         validation.AddError($"{_name} has no backing delegate.");
     }
 }
예제 #3
0
 /// <summary>
 /// Validates thie method
 /// </summary>
 /// <param name="validation">Validation</param>
 internal override void Validate(MethodValidationResult validation)
 {
     foreach (var p in _params)
     {
         p.Validate(validation.ValidateSubparameter(p.Type, p.ToString()));
     }
     if (_expr == null)
     {
         validation.AddError($"{_name} has no linq expression.");
     }
 }