Skip to content

Commit 94ff467

Browse files
committed
Remove singleton empty collections
They were only used in test code, and they don't add any value over `[]`.
1 parent f857ee6 commit 94ff467

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/PackageRestore/Snapshots/RestoreBuilder.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ namespace Microsoft.VisualStudio.ProjectSystem.PackageRestore;
99
/// </summary>
1010
internal static class RestoreBuilder
1111
{
12-
public static readonly ImmutableArray<TargetFrameworkInfo> EmptyTargetFrameworks = [];
13-
public static readonly ImmutableArray<ReferenceItem> EmptyReferences = [];
14-
1512
/// <summary>
1613
/// Converts an immutable dictionary of rule snapshot data into an <see cref="ProjectRestoreInfo"/> instance.
1714
/// </summary>

tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/Mocks/ProjectRestoreInfoFactory.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ internal static class ProjectRestoreInfoFactory
66
{
77
public static ProjectRestoreInfo Create(string? msbuildProjectExtensionsPath = null)
88
{
9-
return new ProjectRestoreInfo(msbuildProjectExtensionsPath ?? string.Empty, string.Empty, string.Empty,
10-
RestoreBuilder.EmptyTargetFrameworks,
11-
RestoreBuilder.EmptyReferences);
9+
return new ProjectRestoreInfo(
10+
msbuildProjectExtensionsPath: msbuildProjectExtensionsPath ?? "",
11+
projectAssetsFilePath: "",
12+
originalTargetFrameworks: "",
13+
targetFrameworks: [],
14+
toolReferences: []);
1215
}
1316
}

0 commit comments

Comments
 (0)