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

Enable DispatchProxy ByRef In tests for .NET 6 #17

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions test/DivertR.UnitTests/ByRefInTests.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
using DivertR.DynamicProxy;
using DivertR.UnitTests.Model;
using DivertR.UnitTests.Model;
using Shouldly;
using Xunit;

namespace DivertR.UnitTests
{
public class ByRefInTests
{
// Due to a known issue DispatchProxy does not currently support in byref parameters
#if NET6_0_OR_GREATER
private static readonly DiverterSettings DiverterSettings = new();
#else
// Due to a known issue DispatchProxy does not support in byref parameters prior to .NET 6
// https://github.com/dotnet/runtime/issues/47522
private static readonly DiverterSettings DiverterSettings = new(new DynamicProxyFactory());

private static readonly DiverterSettings DiverterSettings = new(proxyFactory: new DynamicProxy.DynamicProxyFactory());
#endif
private readonly IVia<INumberIn> _via = new ViaSet(DiverterSettings).Via<INumberIn>();

[Fact]
Expand Down