@@ -35,15 +35,6 @@ public AssemblyPartitionInfo(string assemblyPath)
35
35
36
36
public sealed class AssemblyScheduler
37
37
{
38
- /// <summary>
39
- /// This is a test class inserted into assemblies to guard against a .NET desktop bug. The tests
40
- /// inside of it counteract the underlying issue. If this test is included in any assembly it
41
- /// must be added to every partition to ensure the work around is present
42
- ///
43
- /// https://github.com/dotnet/corefx/issues/3793
44
- /// https://github.com/dotnet/roslyn/issues/8936
45
- /// </summary>
46
- private const string EventListenerGuardFullName = "Microsoft.CodeAnalysis.UnitTests.EventListenerGuard" ;
47
38
48
39
private readonly struct TypeInfo
49
40
{
@@ -78,23 +69,20 @@ private sealed class AssemblyInfoBuilder
78
69
private readonly StringBuilder _builder = new ( ) ;
79
70
private readonly string _assemblyPath ;
80
71
private readonly int _methodLimit ;
81
- private readonly bool _hasEventListenerGuard ;
82
72
private readonly bool _netFramework ;
83
73
private int _currentId ;
84
74
private List < TypeInfo > _currentTypeInfoList = new ( ) ;
85
75
86
- private AssemblyInfoBuilder ( string assemblyPath , int methodLimit , bool hasEventListenerGuard , bool netFramework = false )
76
+ private AssemblyInfoBuilder ( string assemblyPath , int methodLimit , bool netFramework = false )
87
77
{
88
78
_assemblyPath = assemblyPath ;
89
79
_methodLimit = methodLimit ;
90
- _hasEventListenerGuard = hasEventListenerGuard ;
91
80
_netFramework = netFramework ;
92
81
}
93
82
94
83
internal static void Build ( string assemblyPath , int methodLimit , List < TypeInfo > typeInfoList , out List < Partition > partitionList , out List < AssemblyPartitionInfo > assemblyInfoList , bool netFramework = false )
95
84
{
96
- var hasEventListenerGuard = typeInfoList . Any ( x => x . FullName == EventListenerGuardFullName ) ;
97
- var builder = new AssemblyInfoBuilder ( assemblyPath , methodLimit , hasEventListenerGuard , netFramework ) ;
85
+ var builder = new AssemblyInfoBuilder ( assemblyPath , methodLimit , netFramework ) ;
98
86
builder . Build ( typeInfoList ) ;
99
87
partitionList = builder . _partitionList ;
100
88
assemblyInfoList = builder . _assemblyInfoList ;
@@ -131,12 +119,6 @@ private void BeginPartition()
131
119
_currentId ++ ;
132
120
_currentTypeInfoList = new List < TypeInfo > ( ) ;
133
121
_builder . Length = 0 ;
134
-
135
- // Ensure the EventListenerGuard is in every partition.
136
- if ( _hasEventListenerGuard )
137
- {
138
- _builder . Append ( $@ "-class ""{ EventListenerGuardFullName } "" ") ;
139
- }
140
122
}
141
123
142
124
private void CheckForPartitionLimit ( bool done )
0 commit comments