Skip to content
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

Mock methods that take or return a Span<T> #1049

Closed
trampster opened this issue Aug 17, 2020 · 2 comments
Closed

Mock methods that take or return a Span<T> #1049

trampster opened this issue Aug 17, 2020 · 2 comments

Comments

@trampster
Copy link

Expression Trees cannot contain a Span. Moq seems to be built around expression trees.

How can Span support be added to the mock library

@stakx
Copy link
Contributor

stakx commented Aug 18, 2020

Perhaps check out the upcoming Moq version 5 over at https://github.com/moq/moq. For the current version 4 at this repo here, (last time I checked) I don't think there's any way to add full support for Span<T> et al. due to limitations in the LINQ expression tree API and reflection.

@stakx
Copy link
Contributor

stakx commented Sep 7, 2020

I'll close this issue since in all likelihood there's nothing we can do about Span (unfortunately). If this question pops up again in the future, I'll probably reopen & pin it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants