Skip to content

Commit 4043d3d

Browse files
authored
refactor: simplify the InternalsVisibleTo usage (open-feature#408)
## This PR simplify and unify the InternalsVisibleTo usage --------- Signed-off-by: Weihan Li <[email protected]>
1 parent f1bf7a6 commit 4043d3d

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/OpenFeature.DependencyInjection/OpenFeature.DependencyInjection.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
21-
<_Parameter1>$(AssemblyName).Tests</_Parameter1>
22-
</AssemblyAttribute>
23-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
24-
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
25-
</AssemblyAttribute>
20+
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
21+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
2622
</ItemGroup>
2723

2824
</Project>

src/OpenFeature/FeatureProvider.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
using System.Collections.Immutable;
2-
using System.Runtime.CompilerServices;
32
using System.Threading;
43
using System.Threading.Channels;
54
using System.Threading.Tasks;
65
using OpenFeature.Constant;
76
using OpenFeature.Model;
87

9-
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // required to allow NSubstitute mocking of internal methods
10-
118
namespace OpenFeature
129
{
1310
/// <summary>

src/OpenFeature/OpenFeature.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
1516
<InternalsVisibleTo Include="OpenFeature.Benchmarks" />
1617
<InternalsVisibleTo Include="OpenFeature.Tests" />
1718
<InternalsVisibleTo Include="OpenFeature.E2ETests" />

0 commit comments

Comments
 (0)