2 types derived from CommandLineParser
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCommandLineParser.cs (1)
21public class CSharpCommandLineParser : CommandLineParser
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCommandLineParser.vb (1)
22Inherits CommandLineParser
55 references to CommandLineParser
csc (2)
src\Compilers\Shared\BuildClient.cs (2)
135if (CommandLineParser.TryParseClientArgs( 365return CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments: false).Skip(1);
Microsoft.CodeAnalysis (2)
CommandLine\CommandLineArguments.cs (1)
287/// Options to the <see cref="CommandLineParser"/>.
CommandLine\CommonCompiler.cs (1)
125public CommonCompiler(CommandLineParser parser, string? responseFile, string[] args, BuildPaths buildPaths, string? additionalReferenceDirectories, IAnalyzerAssemblyLoader assemblyLoader, GeneratorDriverCache? driverCache, ICommonCompilerFileSystem? fileSystem)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
128var args = CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments: true); 11567AssertEx.Equal(expected, CommandLineParser.SplitWithDoubledSeparatorEscaping(str, ','));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpInteractiveEvaluatorLanguageInfoProvider.cs (1)
32public override CommandLineParser CommandLineParser
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Hosting\CSharpReplServiceProvider.cs (1)
21public override CommandLineParser CommandLineParser => CSharpCommandLineParser.Script;
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractiveEvaluatorLanguageInfoProvider.cs (1)
15public abstract CommandLineParser CommandLineParser { get; }
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
521var parser = serviceState.ReplServiceProvider.CommandLineParser;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ReplServiceProvider.cs (1)
17public abstract CommandLineParser CommandLineParser { get; }
Microsoft.CodeAnalysis.UnitTests (27)
CommonCommandLineParserTests.cs (27)
22var actual = CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments).ToArray(); 1114CommandLineParser.ParseSeparatedStrings(arg.AsMemory(), separators, removeEmptyEntries, builder); 1160CommandLineParser.SplitCommandLineIntoArguments(@"\\test", removeHashComments: false)); 1166CommandLineParser.SplitCommandLineIntoArguments(@"\\""test", removeHashComments: false)); 1170CommandLineParser.SplitCommandLineIntoArguments(@"\\\""test", removeHashComments: false)); 1174CommandLineParser.SplitCommandLineIntoArguments(@"\\\test", removeHashComments: false)); 1178CommandLineParser.SplitCommandLineIntoArguments(@"\\\\\test", removeHashComments: false)); 1189CommandLineParser.SplitCommandLineIntoArguments(@"a b", removeHashComments: false)); 1193CommandLineParser.SplitCommandLineIntoArguments(@"""a b""", removeHashComments: false)); 1197CommandLineParser.SplitCommandLineIntoArguments(@"""a "" b""", removeHashComments: false)); 1203CommandLineParser.SplitCommandLineIntoArguments(@"""a \"" b""", removeHashComments: false)); 1207CommandLineParser.SplitCommandLineIntoArguments(@"\a b", removeHashComments: false)); 1212CommandLineParser.SplitCommandLineIntoArguments(@"\""a b\""", removeHashComments: false)); 1217CommandLineParser.SplitCommandLineIntoArguments(@"\\""a b\\""", removeHashComments: false)); 1221CommandLineParser.SplitCommandLineIntoArguments(@"""a""m""b""", removeHashComments: false)); 1237Assert.Equal(@"\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\test.cs")); 1238Assert.Equal(@"\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"""\\test.cs""")); 1239Assert.Equal(@"\\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\\test.cs")); 1240Assert.Equal(@"\\\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\\\test.cs")); 1241Assert.Equal(@"\\test\a\b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\test\a\b.cs")); 1242Assert.Equal(@"\\\\test\\a\\b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\\\test\\a\\b.cs")); 1243Assert.Equal(@"a""b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"a\""b.cs")); 1244Assert.Equal(@"a"" mid ""b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"a\"" mid \""b.cs")); 1245Assert.Equal(@"a mid b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"a"" mid ""b.cs")); 1246Assert.Equal(@"a.cs", CommandLineParser.RemoveQuotesAndSlashes(@"""a.cs""")); 1247Assert.Equal(@"C:""My Folder\MyBinary.xml", CommandLineParser.RemoveQuotesAndSlashes(@"C:\""My Folder""\MyBinary.xml")); 1264var memory = CommandLineParser.RemoveQuotesAndSlashesEx(arg.AsMemory());
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (8)
CommandLineTests.vb (8)
55Dim args = CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments:=True) 4559Diagnostic(ERRID.ERR_ArgumentRequired).WithArguments("errorlog", CommandLineParser.ErrorLogOptionFormat)) 4565Diagnostic(ERRID.ERR_ArgumentRequired).WithArguments("errorlog", CommandLineParser.ErrorLogOptionFormat)) 4624Diagnostic(ERRID.ERR_BadSwitchValue).WithArguments("C:\MyFolder\MyBinary.xml,version=42", "errorlog", CommandLineParser.ErrorLogOptionFormat)) 4630Diagnostic(ERRID.ERR_BadSwitchValue).WithArguments("C:\MyFolder\MyBinary.xml,version=1.0.0", "errorlog", CommandLineParser.ErrorLogOptionFormat)) 4636Diagnostic(ERRID.ERR_BadSwitchValue).WithArguments("C:\MyFolder\MyBinary.xml,version=2.1.0", "errorlog", CommandLineParser.ErrorLogOptionFormat)) 4643Diagnostic(ERRID.ERR_BadSwitchValue).WithArguments("C:\MyFolder\MyBinary.xml,invalid=42", "errorlog", CommandLineParser.ErrorLogOptionFormat)) 4650Diagnostic(ERRID.ERR_BadSwitchValue).WithArguments("C:\MyFolder\MyBinary.xml,version=2,version=2", "errorlog", CommandLineParser.ErrorLogOptionFormat))
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
Hosting\VisualBasicReplServiceProvider.vb (1)
18Public Overrides ReadOnly Property CommandLineParser As CommandLineParser
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\CommandLineProject.cs (1)
185var args = CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments: true);
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (1)
98var arguments = CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments: false);
vbc (2)
src\Compilers\Shared\BuildClient.cs (2)
135if (CommandLineParser.TryParseClientArgs( 365return CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments: false).Skip(1);
VBCSCompiler (2)
src\Compilers\Shared\BuildClient.cs (2)
135if (CommandLineParser.TryParseClientArgs( 365return CommandLineParser.SplitCommandLineIntoArguments(commandLine, removeHashComments: false).Skip(1);
VBCSCompiler.UnitTests (2)
BuildClientTests.cs (1)
202return CommandLineParser.TryParseClientArgs(
CompilerServerTests.cs (1)
83if (CommandLineParser.TryParseClientArgs(