1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 using System
.Collections
.Generic
;
6 using System
.Runtime
.CompilerServices
;
11 internal static partial class PasteArguments
14 /// Repastes a set of arguments into a linear string that parses back into the originals under pre- or post-2008 VC parsing rules.
15 /// On Unix: the rules for parsing the executable name (argv[0]) are ignored.
17 internal static string Paste(IEnumerable
<string> arguments
, bool pasteFirstArgumentUsingArgV0Rules
)
19 var stringBuilder
= new StringBuilder();
20 foreach (string argument
in arguments
)
22 AppendArgument(stringBuilder
, argument
);
24 return stringBuilder
.ToString();