Skip to content

Commit e15417d

Browse files
committed
Drop exception in ctor
1 parent 75e273f commit e15417d

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/Adapter/MSTestAdapter.PlatformServices/Services/ReflectionOperations2.cs

-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ internal sealed class ReflectionOperations2 : ReflectionOperations, IReflectionO
1010
private const BindingFlags DeclaredOnlyLookup = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
1111
private const BindingFlags Everything = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
1212

13-
public ReflectionOperations2()
14-
{
15-
#if NET8_0_OR_GREATER
16-
if (!RuntimeFeature.IsDynamicCodeSupported)
17-
{
18-
throw new NotSupportedException("ReflectionOperations2 are not allowed when dynamic code is not supported, use NativeReflectionOperations instead");
19-
}
20-
#endif
21-
}
22-
2313
#pragma warning disable IL2070 // this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.
2414
#pragma warning disable IL2026 // Members attributed with RequiresUnreferencedCode may break when trimming
2515
#pragma warning disable IL2067 // 'target parameter' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to 'target method'.

0 commit comments

Comments
 (0)