Skip to content

Commit

Permalink
Enable DispatchProxy ByRef In tests for .NET 6 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
devodo authored Aug 9, 2022
1 parent 8ddcd24 commit aa60a90
Showing 1 changed file with 7 additions and 5 deletions.
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

0 comments on commit aa60a90

Please sign in to comment.