From 26a33cd8a1ab87e99febf87bd6318545ae55ac92 Mon Sep 17 00:00:00 2001 From: Pedro Jesus Date: Thu, 1 Feb 2024 22:10:49 -0300 Subject: [PATCH] chore: use the old API to make CI happy --- src/Resizetizer/src/GeneratePackageAppxManifest.cs | 2 +- .../UnitTests/GeneratePackageAppxManifestTests.cs | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Resizetizer/src/GeneratePackageAppxManifest.cs b/src/Resizetizer/src/GeneratePackageAppxManifest.cs index fea255f9..7437eeec 100644 --- a/src/Resizetizer/src/GeneratePackageAppxManifest.cs +++ b/src/Resizetizer/src/GeneratePackageAppxManifest.cs @@ -24,7 +24,7 @@ public class GeneratePackageAppxManifest_v0 : Task public string IntermediateOutputPath { get; set; } = null!; [Required] - public ITaskItem[] AppxManifest { get; set; } = []; + public ITaskItem[] AppxManifest { get; set; } = Array.Empty(); public string? TargetFramework { get; set; } diff --git a/src/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs b/src/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs index 3499f030..83b74a2e 100644 --- a/src/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs +++ b/src/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs @@ -27,13 +27,12 @@ protected GeneratePackageAppxManifest_v0 GetNewTask( IntermediateOutputPath = DestinationDirectory, BuildEngine = this, GeneratedFilename = generatedFilename, - AppxManifest = [new TaskItem(manifest)], + AppxManifest = new []{new TaskItem(manifest)}, ApplicationId = guid, ApplicationDisplayVersion = displayVersion, ApplicationVersion = version, - ApplicationTitle = displayName, - AppIcon = appIcon == null ? null : [appIcon], - SplashScreen = splashScreen == null ? null : [splashScreen], + ApplicationTitle = displayName,AppIcon = appIcon == null ? null : new[] { appIcon }, + SplashScreen = splashScreen == null ? null : new[] { splashScreen }, TargetFramework = "windows" }; } @@ -57,9 +56,8 @@ protected GeneratePackageAppxManifest_v0 GetNewTask( ApplicationId = guid, ApplicationDisplayVersion = displayVersion, ApplicationVersion = version, - ApplicationTitle = displayName, - AppIcon = appIcon == null ? null : [appIcon], - SplashScreen = splashScreen == null ? null : [splashScreen], + ApplicationTitle = displayName,AppIcon = appIcon == null ? null : new[] { appIcon }, + SplashScreen = splashScreen == null ? null : new[] { splashScreen }, TargetFramework = "windows" }; } @@ -217,7 +215,7 @@ public void TaskShouldFileAWarningIfMoreThanOneManifestIsProvided() { // Arrange var taskItem = new TaskItem("testdata/appxmanifest/typical.appxmanifest"); - var task = GetNewTask(appxManifests: [taskItem, taskItem]); + var task = GetNewTask(appxManifests: new [] {taskItem, taskItem}); // Act task.Execute();