Skip to content

Commit 4a9c72f

Browse files
committed
fix(utilities): compilation error
1 parent 78d3e3e commit 4a9c72f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/Nuke.Utilities/Text/String.Join.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ public static string JoinCommaSpace(this IEnumerable<string> values)
125125
[Pure]
126126
public static string JoinCommaOr(this IEnumerable<string> values)
127127
{
128-
var valuesList = values.ToArray();
129-
return valuesList.Length >= 2
130-
? valuesList.Reverse().Skip(1).Reverse().JoinCommaSpace() + $"{(valuesList.Length > 2 ? "," : string.Empty)} or " + valuesList.Last()
128+
ICollection<string> valuesList = values.ToList();
129+
return valuesList.Count >= 2
130+
? valuesList.Reverse().Skip(1).Reverse().JoinCommaSpace() + $"{(valuesList.Count > 2 ? "," : string.Empty)} or " + valuesList.Last()
131131
: valuesList.JoinCommaSpace();
132132
}
133133

@@ -137,9 +137,9 @@ public static string JoinCommaOr(this IEnumerable<string> values)
137137
[Pure]
138138
public static string JoinCommaAnd(this IEnumerable<string> values)
139139
{
140-
var valuesList = values.ToArray();
141-
return valuesList.Length >= 2
142-
? valuesList.Reverse().Skip(1).Reverse().JoinCommaSpace() + $"{(valuesList.Length > 2 ? "," : string.Empty)} and " + valuesList.Last()
140+
ICollection<string> valuesList = values.ToList();
141+
return valuesList.Count >= 2
142+
? valuesList.Reverse().Skip(1).Reverse().JoinCommaSpace() + $"{(valuesList.Count > 2 ? "," : string.Empty)} and " + valuesList.Last()
143143
: valuesList.JoinCommaSpace();
144144
}
145145

0 commit comments

Comments
 (0)