Eligibility rule based on target method not returning void

Typically eligibility rules I've put together are based on a specifically typed return or paramters. I can't figured out how to do this so I thought I'd ask here - how can one add an eligibility rule that excludes methods that return a void? Thanks!
2 Replies
Petr Onderka
Petr Onderka17mo ago
Are you looking for MustNotBeVoid()? E.g.:
c#
public override void BuildEligibility(IEligibilityBuilder<IMethod> builder)
{
builder.ReturnParameter().MustNotBeVoid();
}
c#
public override void BuildEligibility(IEligibilityBuilder<IMethod> builder)
{
builder.ReturnParameter().MustNotBeVoid();
}
(I do find it a bit weird that the method only exists for IParameter, when regular parameters can never be void, only the return "parameter".)
Want results from more Discord servers?
Add your server