1 write to Arguments
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
135this.Arguments = parser.Parse(allArgs, buildPaths.WorkingDirectory, buildPaths.SdkDirectory, additionalReferenceDirectories);
91 references to Arguments
Microsoft.CodeAnalysis (67)
CommandLine\CommonCompiler.cs (67)
139this.EmbeddedSourcePaths = GetEmbeddedSourcePaths(Arguments); 208var pathResolver = new CompilerRelativePathResolver(FileSystem, Arguments.ReferencePaths, Arguments.BaseDirectory!); 223Arguments.ResolveMetadataReferences(commandLineReferenceResolver, diagnostics, this.MessageProvider, resolved); 225if (Arguments.IsScriptRunner) 265return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 270return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 398return EmbeddedText.FromBytes(filePath, bytes, Arguments.ChecksumAlgorithm); 402return EmbeddedText.FromStream(filePath, stream, Arguments.ChecksumAlgorithm); 415if (Arguments.EmbeddedFiles.IsEmpty) 420var embeddedTreeMap = new Dictionary<string, SyntaxTree>(Arguments.EmbeddedFiles.Length); 421var embeddedFileOrderedSet = new OrderedSet<string>(Arguments.EmbeddedFiles.Select(e => e.Path)); 708Debug.Assert(Arguments.ErrorLogOptions?.Path != null); 711var errorLog = OpenFile(Arguments.ErrorLogOptions.Path, 729if (Arguments.ErrorLogOptions.SarifVersion == SarifVersion.Sarif1) 761if (Arguments.ErrorLogOptions?.Path != null) 815!Arguments.ParseOptions.Features.ContainsKey("enable-generator-cache") || 816string.IsNullOrWhiteSpace(Arguments.OutputFileName); 843Debug.Assert(!string.IsNullOrWhiteSpace(Arguments.OutputFileName)); 853sb.Builder.Append(Arguments.GetOutputFilePath(Arguments.OutputFileName)); 869Debug.Assert(!Arguments.IsScriptRunner); 873if (Arguments.DisplayVersion) 879if (Arguments.DisplayLangVersions) 885if (Arguments.DisplayLogo) 890if (Arguments.DisplayHelp) 896if (ReportDiagnostics(Arguments.Errors, consoleOutput, errorLogger, compilation: null)) 901var touchedFilesLogger = (Arguments.TouchedFilesPath != null) ? new TouchedFileLogger() : null; 909if (Arguments.AnalyzerConfigPaths.Length > 0) 911if (!TryGetAnalyzerConfigSet(Arguments.AnalyzerConfigPaths, diagnostics, out analyzerConfigSet)) 919sourceFileAnalyzerConfigOptions = Arguments.SourceFiles.SelectAsArray(f => analyzerConfigSet.GetOptionsForSourcePath(f.Path)); 934ResolveAnalyzersFromArguments(diagnosticInfos, MessageProvider, compilation.Options, Arguments.SkipAnalyzers, out var analyzers, out var generators); 988if (Arguments.ReportAnalyzer) 993if (Arguments.ReportInternalsVisibleToAttributes) 1052if (Arguments.AnalyzerConfigPaths.Length > 0) 1136var explicitGeneratedOutDir = Arguments.GeneratedFilesOutputDirectory; 1138var baseDirectory = hasExplicitGeneratedOutDir ? explicitGeneratedOutDir! : Arguments.OutputDirectory; 1139(compilation, generatorTimingInfo) = RunGenerators(compilation, baseDirectory, Arguments.ParseOptions, generators, analyzerConfigProvider, additionalTextFiles, diagnostics); 1141bool hasAnalyzerConfigs = !Arguments.AnalyzerConfigPaths.IsEmpty; 1142var generatedSyntaxTrees = compilation.SyntaxTrees.Skip(Arguments.SourceFiles.Length).ToList(); 1232var finalPeFilePath = Arguments.GetOutputFilePath(outputName); 1233var finalPdbFilePath = Arguments.GetPdbFilePath(outputName); 1234var finalXmlFilePath = Arguments.DocumentationPath; 1241var emitOptions = Arguments.EmitOptions. 1243WithPdbFilePath(PathUtilities.NormalizePathPrefix(finalPdbFilePath, Arguments.PathMap)); 1248if (Arguments.ParseOptions.Features.ContainsKey("pdb-path-determinism") && !string.IsNullOrEmpty(emitOptions.PdbFilePath)) 1253if (Arguments.ParseOptions.Features.ContainsKey("debug-determinism")) 1255EmitDeterminismKey(compilation, FileSystem, additionalTextFiles, analyzers, generators, Arguments.PathMap, emitOptions); 1258if (Arguments.SourceLink != null) 1261Arguments.SourceLink, 1271Arguments.SourceLink, 1288Arguments.ManifestResources, 1304Arguments.EmitPdb, 1362using (var win32ResourceStreamOpt = GetWin32Resources(FileSystem, MessageProvider, Arguments, compilation, diagnostics)) 1423var pdbStreamProviderOpt = Arguments.EmitPdbFile ? new CompilerEmitStreamProvider(this, finalPdbFilePath) : null; 1425string? finalRefPeFilePath = Arguments.OutputRefFilePath; 1511if (Arguments.ErrorLogPath == null) 1520reportAnalyzer: Arguments.ReportAnalyzer || errorLogger != null, 1540if (Arguments.TouchedFilesPath != null) 1549string readFilesPath = Arguments.TouchedFilesPath + ".read"; 1550string writtenFilesPath = Arguments.TouchedFilesPath + ".write"; 1591foreach (var file in Arguments.AdditionalFiles) 1727return Arguments.PreferredUILang ?? CultureInfo.CurrentUICulture; 1741var filePath = Path.Combine(Arguments.OutputDirectory, Arguments.OutputFileName + ".key");
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCompiler.cs (1)
36protected internal new CSharpCommandLineArguments Arguments { get { return (CSharpCommandLineArguments)base.Arguments; } }
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
DeterministicKeyBuilderTests.cs (2)
87Assert.Empty(compiler.Arguments.Errors); 98var obj = GetSyntaxTreeValues(compilation, compiler.Arguments.PathMap);
RebuildCommandLineTests.cs (2)
90Assert.True(commonCompiler.Arguments.CompilationOptions.Deterministic); 106RoundTripUtil.VerifyCompilationOptions(commonCompiler.Arguments.CompilationOptions, compilation.Options);
Microsoft.CodeAnalysis.Scripting (14)
Hosting\CommandLine\CommandLineRunner.cs (14)
56if (Compiler.Arguments.ErrorLogOptions?.Path != null) 76Debug.Assert(Compiler.Arguments.IsScriptRunner); 78var sourceFiles = Compiler.Arguments.SourceFiles; 80if (Compiler.Arguments.DisplayVersion) 86if (Compiler.Arguments.DisplayLangVersions) 92if (sourceFiles.IsEmpty && Compiler.Arguments.DisplayLogo) 96if (!Compiler.Arguments.DisplayHelp) 102if (Compiler.Arguments.DisplayHelp) 125var emitDebugInformation = !Compiler.Arguments.InteractiveMode; 128var scriptOptions = GetScriptOptions(Compiler.Arguments, scriptPathOpt, Compiler.MessageProvider, diagnosticsInfos, emitDebugInformation); 130var errors = Compiler.Arguments.Errors.Concat(diagnosticsInfos.Select(Diagnostic.Create)); 139if (Compiler.Arguments.InteractiveMode) 203globals.Args.AddRange(Compiler.Arguments.ScriptArguments); 225globals.Args.AddRange(Compiler.Arguments.ScriptArguments);
VBCSCompiler (2)
src\Compilers\Server\VBCSCompiler\CompilerRequestHandler.cs (2)
140if (!AnalyzerConsistencyChecker.Check(request.WorkingDirectory, compiler.Arguments.AnalyzerReferences, AnalyzerAssemblyLoader, Logger, out List<string>? errorMessages)) 150bool utf8output = compiler.Arguments.Utf8Output;
VBCSCompiler.UnitTests (3)
TouchedFileLoggingTests.cs (3)
160expectedReads.AddRange(cmd.Arguments.MetadataReferences.Select(r => r.Reference)); 162if (cmd.Arguments is VisualBasicCommandLineArguments { DefaultCoreLibraryReference: { } reference }) 167foreach (var file in cmd.Arguments.SourceFiles)