Skip to content

Commit 51e149b

Browse files
committed
Revert "[TFM Display] Create model for badges and table from compatible frameworks. (#8881)"
This reverts commit 33035da.
1 parent 33035da commit 51e149b

10 files changed

Lines changed: 12 additions & 514 deletions

src/NuGetGallery.Core/Frameworks/FrameworkCompatibilityService.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ public ISet<NuGetFramework> GetCompatibleFrameworks(IEnumerable<NuGetFramework>
3333
{
3434
allCompatibleFrameworks.UnionWith(compatibleFrameworks);
3535
}
36-
else
37-
{
38-
allCompatibleFrameworks.Add(packageFramework);
39-
}
4036
}
4137

4238
return allCompatibleFrameworks;

src/NuGetGallery.Core/Frameworks/FrameworkProductNames.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/NuGetGallery.Core/Frameworks/PackageFrameworkCompatibility.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/NuGetGallery.Core/Frameworks/PackageFrameworkCompatibilityBadges.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/NuGetGallery.Core/Frameworks/PackageFrameworkCompatibilityFactory.cs

Lines changed: 0 additions & 151 deletions
This file was deleted.

src/NuGetGallery.Core/Frameworks/PackageFrameworkCompatibilityTableData.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/NuGetGallery.Core/Frameworks/SupportedFrameworks.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public static class SupportedFrameworks
2424
public static readonly NuGetFramework MonoTouch = new NuGetFramework(FrameworkIdentifiers.MonoTouch, EmptyVersion);
2525
public static readonly NuGetFramework MonoMac = new NuGetFramework(FrameworkIdentifiers.MonoMac, EmptyVersion);
2626
public static readonly NuGetFramework Net48 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 8, 0, 0));
27-
public static readonly NuGetFramework Net50Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version5, "windows", EmptyVersion);
28-
public static readonly NuGetFramework Net60Android = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "android", EmptyVersion);
29-
public static readonly NuGetFramework Net60Ios = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "ios", EmptyVersion);
30-
public static readonly NuGetFramework Net60MacOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "macos", EmptyVersion);
31-
public static readonly NuGetFramework Net60MacCatalyst = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "maccatalyst", EmptyVersion);
32-
public static readonly NuGetFramework Net60Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tizen", EmptyVersion);
33-
public static readonly NuGetFramework Net60TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tvos", EmptyVersion);
34-
public static readonly NuGetFramework Net60Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "windows", EmptyVersion);
27+
public static readonly NuGetFramework Net50Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version5, "windows");
28+
public static readonly NuGetFramework Net60Android = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "android");
29+
public static readonly NuGetFramework Net60Ios = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "ios");
30+
public static readonly NuGetFramework Net60MacOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "macos");
31+
public static readonly NuGetFramework Net60MacCatalyst = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "maccatalyst");
32+
public static readonly NuGetFramework Net60Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tizen");
33+
public static readonly NuGetFramework Net60TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tvos");
34+
public static readonly NuGetFramework Net60Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "windows");
3535
public static readonly NuGetFramework NetCore = new NuGetFramework(FrameworkIdentifiers.NetCore, EmptyVersion);
3636
public static readonly NuGetFramework NetMf = new NuGetFramework(FrameworkIdentifiers.NetMicro, EmptyVersion);
3737
public static readonly NuGetFramework UAP = new NuGetFramework(FrameworkIdentifiers.UAP, EmptyVersion);

tests/NuGetGallery.Core.Facts/Frameworks/FrameworkCompatibilityServiceFacts.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,18 @@ public void EmptyPackageFrameworksReturnsEmptySet()
3030
{
3131
var result = _service.GetCompatibleFrameworks(new List<NuGetFramework>());
3232

33-
Assert.Empty(result);
33+
Assert.Equal(expected: 0, actual: result.Count);
3434
}
3535

3636
[Fact]
37-
public void UnknownSupportedPackageReturnsSetWithSameFramework()
37+
public void UnknownSupportedPackageReturnsEmptySet()
3838
{
39-
var framework = NuGetFramework.Parse("net45-client");
39+
var framework = NuGetFramework.Parse("netstandard9.2");
4040
var frameworks = new List<NuGetFramework>() { framework };
4141
var compatible = _service.GetCompatibleFrameworks(frameworks);
4242

4343
Assert.False(framework.IsUnsupported);
44-
Assert.Equal(expected: 1, compatible.Count);
45-
Assert.Contains(framework, compatible);
44+
Assert.Equal(expected: 0, compatible.Count);
4645
}
4746

4847
[Theory]

0 commit comments

Comments
 (0)