You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to mock a method that takes in a ref struct as a parameter, however I cannot use any of the It or Match methods as they all require generic arguments. Is there any way I could create my own specific matcher from scratch for only my ref struct type?
The text was updated successfully, but these errors were encountered:
ref structs are types that live exclusively on the evaluation stack. Our using DynamicProxy (to intercept calls) means that mock method arguments all get boxed to type object (basically to be put in the IInvocation.Arguments array)... which doesn't work for stack-only types. So basically, Moq v4 cannot support ref struct parameters.
Note that by-ref parameters (i.e. pass-by-reference) of all other types is supported via It.Ref<T>.IsAny.
- expand our text matrix to include a modern (and LTS) TFM
- change how Formatting test assemblies are found
- `netcoreapp` is no longer the only relevant folder prefix
- use the latest .NET 6 SDK
- install the 2.1.x runtime in the pipeline
- don't require .NET in VS
- will use binplaced `msbuild` instead
- have `git` ignore the new .msbuild/ folder
- react to new `Exception.Message`s in `netcoreapp3.1`
- handle different formatting of argument info in `ArgumentException.Message`s
- handle slightly greater `decimal` precision in a `JsonReaderException.Message`
- react to new `Exception.Message`s and other changes in `net6.0`
- handle different `Message` in `InvalidOperationException`s about invalid request URIs
- react to other changes in `net6.0`
- handle inability to mock a `Stream` if a writer passes a `ReadOnlySpan<byte>` in `net6.0`
- see devlooped/moq#829, devlooped/moq#979, and dotnet/runtime#45152 about the issue
- skip tests failing due to `HttpResponseMessage` changes
- see #386 and dotnet/runtime@b48900f (which introduced this)
- fix coming **Real Soon Now:tm:** :grin:
- nits:
- simplify define use now that `NETCOREAPP3_1_OR_GREATER` and so on are available
- clean up .gitignore
- clean up a few comments and tighten scripting up
I'm trying to mock a method that takes in a
ref struct
as a parameter, however I cannot use any of theIt
orMatch
methods as they all require generic arguments. Is there any way I could create my own specific matcher from scratch for only myref struct
type?The text was updated successfully, but these errors were encountered: