Making a generic type constraint on Func<T>
Unfortunately, it looks like you are out of luck. Func<>
and Action<>
are both delegate types, which cannot be used as a generic type constraint.
This answer sums it up pretty well C# Generics won't allow Delegate Type Constraints