Revert "Revert "Fix of Func<T> dependency as parameter.""

This reverts commit c90a21e9492a23cfb3c0877d63d20b7128ed4db8.