1 write to Arguments
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
132this.Arguments = parser.Parse(allArgs, buildPaths.WorkingDirectory, buildPaths.SdkDirectory, additionalReferenceDirectories);
92 references to Arguments
Microsoft.CodeAnalysis (67)
CommandLine\CommonCompiler.cs (67)
136this.EmbeddedSourcePaths = GetEmbeddedSourcePaths(Arguments); 217var pathResolver = new CompilerRelativePathResolver(FileSystem, Arguments.ReferencePaths, Arguments.BaseDirectory!); 232Arguments.ResolveMetadataReferences(commandLineReferenceResolver, diagnostics, this.MessageProvider, resolved); 234if (Arguments.IsScriptRunner) 274return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 279return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 407return EmbeddedText.FromBytes(filePath, bytes, Arguments.ChecksumAlgorithm); 411return EmbeddedText.FromStream(filePath, stream, Arguments.ChecksumAlgorithm); 424if (Arguments.EmbeddedFiles.IsEmpty) 429var embeddedTreeMap = new Dictionary<string, SyntaxTree>(Arguments.EmbeddedFiles.Length); 430var embeddedFileOrderedSet = new OrderedSet<string>(Arguments.EmbeddedFiles.Select(e => e.Path)); 643Debug.Assert(Arguments.ErrorLogOptions?.Path != null); 646var errorLog = OpenFile(Arguments.ErrorLogOptions.Path, 664if (Arguments.ErrorLogOptions.SarifVersion == SarifVersion.Sarif1) 696if (Arguments.ErrorLogOptions?.Path != null) 746!Arguments.ParseOptions.Features.ContainsKey("enable-generator-cache") || 747string.IsNullOrWhiteSpace(Arguments.OutputFileName); 770Debug.Assert(!string.IsNullOrWhiteSpace(Arguments.OutputFileName)); 780sb.Builder.Append(Arguments.GetOutputFilePath(Arguments.OutputFileName)); 796Debug.Assert(!Arguments.IsScriptRunner); 800if (Arguments.DisplayVersion) 806if (Arguments.DisplayLangVersions) 812if (Arguments.DisplayLogo) 817if (Arguments.DisplayHelp) 823if (ReportDiagnostics(Arguments.Errors, consoleOutput, errorLogger, compilation: null)) 828var touchedFilesLogger = (Arguments.TouchedFilesPath != null) ? new TouchedFileLogger() : null; 836if (Arguments.AnalyzerConfigPaths.Length > 0) 838if (!TryGetAnalyzerConfigSet(Arguments.AnalyzerConfigPaths, diagnostics, out analyzerConfigSet)) 846sourceFileAnalyzerConfigOptions = Arguments.SourceFiles.SelectAsArray(f => analyzerConfigSet.GetOptionsForSourcePath(f.Path)); 861ResolveAnalyzersFromArguments(diagnosticInfos, MessageProvider, Arguments.SkipAnalyzers, out var analyzers, out var generators); 916if (Arguments.ReportAnalyzer) 1001if (Arguments.AnalyzerConfigPaths.Length > 0) 1028(compilation, generatorTimingInfo) = RunGenerators(compilation, Arguments.ParseOptions, generators, analyzerConfigProvider, additionalTextFiles, diagnostics); 1030bool hasAnalyzerConfigs = !Arguments.AnalyzerConfigPaths.IsEmpty; 1031bool hasGeneratedOutputPath = !string.IsNullOrWhiteSpace(Arguments.GeneratedFilesOutputDirectory); 1032var generatedSyntaxTrees = compilation.SyntaxTrees.Skip(Arguments.SourceFiles.Length).ToList(); 1054var path = Path.Combine(Arguments.GeneratedFilesOutputDirectory!, tree.FilePath); 1055if (Directory.Exists(Arguments.GeneratedFilesOutputDirectory)) 1102if (Arguments.ErrorLogPath == null) 1111Arguments.ReportAnalyzer, 1132var finalPeFilePath = Arguments.GetOutputFilePath(outputName); 1133var finalPdbFilePath = Arguments.GetPdbFilePath(outputName); 1134var finalXmlFilePath = Arguments.DocumentationPath; 1141var emitOptions = Arguments.EmitOptions. 1143WithPdbFilePath(PathUtilities.NormalizePathPrefix(finalPdbFilePath, Arguments.PathMap)); 1148if (Arguments.ParseOptions.Features.ContainsKey("pdb-path-determinism") && !string.IsNullOrEmpty(emitOptions.PdbFilePath)) 1153if (Arguments.ParseOptions.Features.ContainsKey("debug-determinism")) 1155EmitDeterminismKey(compilation, FileSystem, additionalTextFiles, analyzers, generators, Arguments.PathMap, emitOptions); 1158if (Arguments.SourceLink != null) 1161Arguments.SourceLink, 1171Arguments.SourceLink, 1188Arguments.ManifestResources, 1204Arguments.EmitPdb, 1262using (var win32ResourceStreamOpt = GetWin32Resources(FileSystem, MessageProvider, Arguments, compilation, diagnostics)) 1322var pdbStreamProviderOpt = Arguments.EmitPdbFile ? new CompilerEmitStreamProvider(this, finalPdbFilePath) : null; 1324string? finalRefPeFilePath = Arguments.OutputRefFilePath; 1410if (Arguments.TouchedFilesPath != null) 1419string readFilesPath = Arguments.TouchedFilesPath + ".read"; 1420string writtenFilesPath = Arguments.TouchedFilesPath + ".write"; 1461foreach (var file in Arguments.AdditionalFiles) 1597return Arguments.PreferredUILang ?? CultureInfo.CurrentUICulture; 1611var 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)
95Assert.True(commonCompiler.Arguments.CompilationOptions.Deterministic); 111RoundTripUtil.VerifyCompilationOptions(commonCompiler.Arguments.CompilationOptions, compilation.Options);
Microsoft.CodeAnalysis.Scripting (14)
Hosting\CommandLine\CommandLineRunner.cs (14)
53if (_compiler.Arguments.ErrorLogOptions?.Path != null) 73Debug.Assert(_compiler.Arguments.IsScriptRunner); 75var sourceFiles = _compiler.Arguments.SourceFiles; 77if (_compiler.Arguments.DisplayVersion) 83if (_compiler.Arguments.DisplayLangVersions) 89if (sourceFiles.IsEmpty && _compiler.Arguments.DisplayLogo) 93if (!_compiler.Arguments.DisplayHelp) 99if (_compiler.Arguments.DisplayHelp) 122var emitDebugInformation = !_compiler.Arguments.InteractiveMode; 125var scriptOptions = GetScriptOptions(_compiler.Arguments, scriptPathOpt, _compiler.MessageProvider, diagnosticsInfos, emitDebugInformation); 127var errors = _compiler.Arguments.Errors.Concat(diagnosticsInfos.Select(Diagnostic.Create)); 135if (_compiler.Arguments.InteractiveMode) 195globals.Args.AddRange(_compiler.Arguments.ScriptArguments); 217globals.Args.AddRange(_compiler.Arguments.ScriptArguments);
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCompiler.vb (1)
45Return DirectCast(MyBase.Arguments, VisualBasicCommandLineArguments)
VBCSCompiler (2)
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)
158expectedReads.AddRange(cmd.Arguments.MetadataReferences.Select(r => r.Reference)); 160if (cmd.Arguments is VisualBasicCommandLineArguments { DefaultCoreLibraryReference: { } reference }) 165foreach (var file in cmd.Arguments.SourceFiles)