Skip to content

Commit 32d97c9

Browse files
authored
Remove mock APIs used for PC analyzer as we can now use new APIs (#4483)
1 parent c00d594 commit 32d97c9

File tree

3 files changed

+497
-999
lines changed

3 files changed

+497
-999
lines changed

src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/InteropServices/PlatformCompatibilityAnalyzer.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,9 @@ public override void Initialize(AnalysisContext context)
136136

137137
var typeName = WellKnownTypeNames.SystemOperatingSystem;
138138

139-
// TODO: remove 'typeName + "Helper"' after tests able to consume the real new APIs
140-
if (!context.Compilation.TryGetOrCreateTypeByMetadataName(typeName + "Helper", out var operatingSystemType))
139+
if (!context.Compilation.TryGetOrCreateTypeByMetadataName(typeName, out var operatingSystemType))
141140
{
142-
if (!context.Compilation.TryGetOrCreateTypeByMetadataName(typeName, out operatingSystemType))
143-
{
144-
return;
145-
}
141+
return;
146142
}
147143

148144
var osPlatformType = context.Compilation.GetOrCreateTypeByMetadataName(WellKnownTypeNames.SystemRuntimeInteropServicesOSPlatform);

0 commit comments

Comments
 (0)