-
-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callback
and Returns
: Allow callback parameters to have type object
where a type matcher was used
#953
Comments
What on earth was I thinking when I opened this issue? It gets just about everything backwards.
This already works today, no change needed.
This doesn't work; at least not for |
No, we cannot do that, at least not for public interface IX
{
T void M<T>(T arg);
}
var xMock = new Mock<IX>();
xMock.Setup(x => x.M(It.IsAny<It.IsAnyType>())).Returns((IInvocation invocation) =>
{
// ...
return ?;
}); In the above example, the lambda's return type is fixed to |
Example:
which is arguably more user-friendly than having the following (which we have today):
The text was updated successfully, but these errors were encountered: