Skip to content

Commit c22b982

Browse files
authored
Only enable scenarios starting with the partial name
- Previous code enabled scenarios containing the partial name anywhere, which made it impossible to enable "Plaintext" without "MvcPlaintext".
1 parent fcc58c6 commit c22b982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Benchmarks/Configuration/Scenarios.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public int Enable(string partialName)
139139
}
140140

141141
var props = typeof(Scenarios).GetTypeInfo().DeclaredProperties
142-
.Where(p => string.Equals(partialName, "[all]", StringComparison.OrdinalIgnoreCase) || p.Name.IndexOf(partialName, StringComparison.OrdinalIgnoreCase) >= 0)
142+
.Where(p => string.Equals(partialName, "[all]", StringComparison.OrdinalIgnoreCase) || p.Name.StartsWith(partialName, StringComparison.OrdinalIgnoreCase))
143143
.ToList();
144144

145145
foreach (var p in props)

0 commit comments

Comments
 (0)