Fix typos in CreateItemAvoidingInference
Fixes 7000
Rob Mensching committed
Nov 12, 2022 at 19:06 UTC
0ff785170c06a8dfb42f2d4539215aa69cf53840
2 files changed
+12
-15
src/wix/WixToolset.BuildTasks/CreateItemAvoidingInference.cs
+10
-13
@@ -4,17 +4,18 @@ namespace WixToolset.BuildTasks
4
{
5
using System;
6
using System.Collections.Generic;
7
+ using System.Linq;
8
using Microsoft.Build.Framework;
9
using Microsoft.Build.Utilities;
10
11
/// <summary>
11
- /// This task assigns Culture metadata to files based on the value of the Culture attribute on the
12
- /// WixLocalization element inside the file.
12
+ /// This task creates items from properties without triggering the item creation inference
13
+ /// MSBuild targets will normally do. There are very specialized cases where this is used.
14
/// </summary>
15
public class CreateItemAvoidingInference : Task
16
{
17
/// <summary>
17
- /// The properties to converty to items.
18
+ /// The properties to convert into items.
19
/// </summary>
20
[Required]
21
public string InputProperties { get; set; }
@@ -23,22 +24,18 @@ namespace WixToolset.BuildTasks
24
/// The output items.
25
/// </summary>
26
[Output]
26
- public ITaskItem[] OuputItems { get; private set; }
27
+ public ITaskItem[] OutputItems { get; private set; }
28
29
/// <summary>
29
- /// Gets a complete list of external cabs referenced by the given installer database file.
30
+ /// Convert the input properties into output items.
31
/// </summary>
32
/// <returns>True upon completion of the task execution.</returns>
33
public override bool Execute()
34
{
34
- var newItems = new List<ITaskItem>();
35
-
36
- foreach (var property in this.InputProperties.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
37
- {
38
- newItems.Add(new TaskItem(property));
39
- }
40
-
41
- this.OuputItems = newItems.ToArray();
35
+ this.OutputItems = this.InputProperties
36
+ .Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
37
+ .Select(property => new TaskItem(property))
38
+ .ToArray();
39
40
return true;
41
}
src/wix/WixToolset.Sdk/tools/WixToolset.Signing.targets
+2
-2
@@ -141,8 +141,8 @@
141
Inputs="@(SignTargetPath)"
142
Outputs="$(SignedFilePath)">
143
<CreateItemAvoidingInference InputProperties="@(SignTargetPath)">
144
- <Output TaskParameter="OuputItems" ItemName="SignMsi" />
145
- <Output TaskParameter="OuputItems" ItemName="FileWrites" />
144
+ <Output TaskParameter="OutputItems" ItemName="SignMsi" />
145
+ <Output TaskParameter="OutputItems" ItemName="FileWrites" />
146
</CreateItemAvoidingInference>
147
</Target>
148