78 references to QuotingUtilities
Microsoft.Build.CommandLine.UnitTests (60)
XMake_Tests.cs (60)
165
var sa =
QuotingUtilities
.SplitUnquoted("abcdxyz");
170
sa =
QuotingUtilities
.SplitUnquoted("abcc dxyz");
176
sa =
QuotingUtilities
.SplitUnquoted("abcc;dxyz", ';');
182
sa =
QuotingUtilities
.SplitUnquoted("abc,c;dxyz", ';', ',');
189
sa =
QuotingUtilities
.SplitUnquoted("abc,c;dxyz", 2, false, false, out var emptySplits, ';', ',');
196
sa =
QuotingUtilities
.SplitUnquoted("abc,,;dxyz", int.MaxValue, false, false, out emptySplits, ';', ',');
203
sa =
QuotingUtilities
.SplitUnquoted("abc,,;dxyz", int.MaxValue, true, false, out emptySplits, ';', ',');
212
sa =
QuotingUtilities
.SplitUnquoted("abc\"c d\"xyz");
217
sa =
QuotingUtilities
.SplitUnquoted("abc\"x z");
222
sa =
QuotingUtilities
.SplitUnquoted("abc\"x z\"");
227
sa =
QuotingUtilities
.SplitUnquoted("abc\\\"cde\"x z");
233
sa =
QuotingUtilities
.SplitUnquoted("abc\\\"c e\"x z");
239
sa =
QuotingUtilities
.SplitUnquoted("abc\\\\\"c e\"xyz");
245
sa =
QuotingUtilities
.SplitUnquoted("abc\\\\\"c e\"x z");
251
sa =
QuotingUtilities
.SplitUnquoted("abc\\\\\\\"cde\"x z");
257
sa =
QuotingUtilities
.SplitUnquoted("abc\\\\\\\"c e\"x z");
263
sa =
QuotingUtilities
.SplitUnquoted("abc\"\"\"xyz");
268
sa =
QuotingUtilities
.SplitUnquoted("abc\" \"\"xyz");
273
sa =
QuotingUtilities
.SplitUnquoted("abc\"\" \"x z");
279
sa =
QuotingUtilities
.SplitUnquoted("abc\" \"\"\"x z");
284
sa =
QuotingUtilities
.SplitUnquoted("abc\"\"\"\"\"xyz");
290
sa =
QuotingUtilities
.SplitUnquoted("abc\"\"\"\"\"x z");
296
sa =
QuotingUtilities
.SplitUnquoted("abc\" \"\"\"\"xyz");
301
sa =
QuotingUtilities
.SplitUnquoted("abc\"\"\"\"\"\"xyz");
306
sa =
QuotingUtilities
.SplitUnquoted("abc\" \"\"\" \"\"xyz");
311
sa =
QuotingUtilities
.SplitUnquoted("abc\"\"\" \"\"\"xyz");
317
sa =
QuotingUtilities
.SplitUnquoted("abc\"\"\" \"\"\"x z");
324
sa =
QuotingUtilities
.SplitUnquoted("abc\"c e\"\"xyz");
330
sa =
QuotingUtilities
.SplitUnquoted("abc\"c e\"\"x z");
336
sa =
QuotingUtilities
.SplitUnquoted("a c\"\"x z");
343
sa =
QuotingUtilities
.SplitUnquoted("a c\"\"c e\"\"x z");
355
QuotingUtilities
.Unquote("abc\"cde\"xyz", out var doubleQuotesRemoved).ShouldBe("abccdexyz");
359
QuotingUtilities
.Unquote("abc\"xyz", out doubleQuotesRemoved).ShouldBe("abcxyz");
363
QuotingUtilities
.Unquote("abc\"xyz\"", out doubleQuotesRemoved).ShouldBe("abcxyz");
367
QuotingUtilities
.Unquote("abc\\\"cde\"xyz", out doubleQuotesRemoved).ShouldBe("abc\"cdexyz");
371
QuotingUtilities
.Unquote("abc\\\\\"cde\"xyz", out doubleQuotesRemoved).ShouldBe("abc\\cdexyz");
375
QuotingUtilities
.Unquote("abc\\\\\\\"cde\"xyz", out doubleQuotesRemoved).ShouldBe("abc\\\"cdexyz");
379
QuotingUtilities
.Unquote("abc\"\"\"xyz", out doubleQuotesRemoved).ShouldBe("abc\"xyz");
383
QuotingUtilities
.Unquote("abc\"\"\"\"xyz", out doubleQuotesRemoved).ShouldBe("abc\"xyz");
387
QuotingUtilities
.Unquote("abc\"\"\"\"\"xyz", out doubleQuotesRemoved).ShouldBe("abc\"xyz");
391
QuotingUtilities
.Unquote("abc\"\"\"\"\"\"xyz", out doubleQuotesRemoved).ShouldBe("abc\"\"xyz");
395
QuotingUtilities
.Unquote("abc\"cde\"\"xyz", out doubleQuotesRemoved).ShouldBe("abccde\"xyz");
399
QuotingUtilities
.Unquote("abc\"xyz\"\"", out doubleQuotesRemoved).ShouldBe("abcxyz\"");
403
QuotingUtilities
.Unquote("abc\"\"xyz", out doubleQuotesRemoved).ShouldBe("abcxyz");
407
QuotingUtilities
.Unquote("abc\"\"cde\"\"xyz", out doubleQuotesRemoved).ShouldBe("abccdexyz");
415
string unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out var doubleQuotesRemovedFromArg);
420
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
425
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
430
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
437
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
442
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
447
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
452
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
461
var unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out var doubleQuotesRemovedFromArg);
466
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
471
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
476
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
481
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
486
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
491
unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out doubleQuotesRemovedFromArg);
MSBuild (18)
CommandLineSwitches.cs (3)
542
switchParameters =
QuotingUtilities
.Unquote(switchParameters);
547
_parameterizedSwitches[(int)parameterizedSwitch].parameters.AddRange(
QuotingUtilities
.SplitUnquoted(switchParameters, int.MaxValue, false /* discard empty parameters */, unquoteParameters, out emptyParameters, s_parameterSeparators));
558
switchParameters =
QuotingUtilities
.Unquote(switchParameters);
XMake.cs (15)
1982
var commandLineArgs =
QuotingUtilities
.SplitUnquoted(commandLine);
1984
s_exeName = FileUtilities.FixFilePath(
QuotingUtilities
.Unquote(commandLineArgs[0]));
2034
string unquotedCommandLineArg =
QuotingUtilities
.Unquote(commandLineArg, out var doubleQuotesRemovedFromArg);
2150
string unquotedSwitchIndicatorAndName =
QuotingUtilities
.Unquote(commandLineArg.Substring(0, quotedSwitchParameterIndicator), out var doubleQuotesRemovedFromSwitchIndicatorAndName);
2261
argsFromResponseFile.AddRange(
QuotingUtilities
.SplitUnquoted(Environment.ExpandEnvironmentVariables(responseFileLine)));
4233
string unquotedParameter =
QuotingUtilities
.Unquote(parameter);
4255
var loggerSpec =
QuotingUtilities
.SplitUnquoted(parameter, 2, true /* keep empty splits */, false /* keep quotes */, out _, '*');
4260
string unquotedParameter =
QuotingUtilities
.Unquote(loggerSpec[0]);
4274
unquotedParameter =
QuotingUtilities
.Unquote(loggerSpec[1]);
4301
var loggerSpec =
QuotingUtilities
.SplitUnquoted(parameter, 2, true /* keep empty splits */, false /* keep quotes */, out _, ';');
4313
loggerParameters =
QuotingUtilities
.Unquote(loggerSpec[1]);
4317
var loggerTypeSpec =
QuotingUtilities
.SplitUnquoted(loggerSpec[0], int.MaxValue, true /* keep empty splits */, false /* keep quotes */, out _, ',');
4326
loggerClassName =
QuotingUtilities
.Unquote(loggerTypeSpec[0]);
4327
loggerAssemblySpec =
QuotingUtilities
.Unquote(loggerTypeSpec[1]);
4332
loggerAssemblySpec =
QuotingUtilities
.Unquote(loggerTypeSpec[0]);