1 write to Arguments
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
136this.Arguments = parser.Parse(allArgs, buildPaths.WorkingDirectory, buildPaths.SdkDirectory, additionalReferenceDirectories);
86 references to Arguments
Microsoft.CodeAnalysis (69)
CommandLine\CommonCompiler.cs (69)
140this.EmbeddedSourcePaths = GetEmbeddedSourcePaths(Arguments); 216var pathResolver = new CompilerRelativePathResolver(FileSystem, Arguments.ReferencePaths, Arguments.BaseDirectory); 231Arguments.ResolveMetadataReferences(commandLineReferenceResolver, diagnostics, this.MessageProvider, resolved); 233if (Arguments.IsScriptRunner) 273return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 278return 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)); 717Debug.Assert(Arguments.ErrorLogOptions?.Path != null); 720var errorLog = OpenFile(Arguments.ErrorLogOptions.Path, 738if (Arguments.ErrorLogOptions.SarifVersion == SarifVersion.Sarif1) 770if (Arguments.ErrorLogOptions?.Path != null) 824!Arguments.ParseOptions.HasFeature(Feature.EnableGeneratorCache) || 825string.IsNullOrWhiteSpace(Arguments.OutputFileName); 835driver ??= CreateGeneratorDriver(generatedFilesBaseDirectory, parseOptions, generators, analyzerConfigOptionsProvider, additionalTexts, Arguments.ChecksumAlgorithm); 852Debug.Assert(!string.IsNullOrWhiteSpace(Arguments.OutputFileName)); 862sb.Builder.Append(Arguments.GetOutputFilePath(Arguments.OutputFileName)); 878Debug.Assert(!Arguments.IsScriptRunner); 882if (Arguments.DisplayVersion) 888if (Arguments.DisplayLangVersions) 894if (Arguments.DisplayLogo) 899if (Arguments.DisplayHelp) 905if (ReportDiagnostics(Arguments.Errors, consoleOutput, errorLogger, compilation: null)) 917var touchedFilesLogger = (Arguments.TouchedFilesPath != null) ? new TouchedFileLogger() : null; 923if (Arguments.AnalyzerConfigPaths.Length > 0) 925if (!TryGetAnalyzerConfigSet(Arguments.AnalyzerConfigPaths, diagnostics, out analyzerConfigSet)) 933sourceFileAnalyzerConfigOptions = Arguments.SourceFiles.SelectAsArray(f => analyzerConfigSet.GetOptionsForSourcePath(f.Path)); 948ResolveAnalyzersFromArguments(diagnosticInfos, MessageProvider, compilation.Options, Arguments.SkipAnalyzers, out var analyzers, out var generators); 1009if (Arguments.ReportAnalyzer) 1014if (Arguments.ReportInternalsVisibleToAttributes) 1077if (Arguments.AnalyzerConfigPaths.Length > 0) 1161var explicitGeneratedOutDir = Arguments.GeneratedFilesOutputDirectory; 1163var baseDirectory = hasExplicitGeneratedOutDir ? explicitGeneratedOutDir! : Arguments.OutputDirectory; 1164(compilation, generatorTimingInfo) = RunGenerators(compilation, baseDirectory, Arguments.ParseOptions, generators, analyzerConfigProvider, additionalTextFiles, diagnostics); 1166bool hasAnalyzerConfigs = !Arguments.AnalyzerConfigPaths.IsEmpty; 1167var generatedSyntaxTrees = compilation.SyntaxTrees.Skip(Arguments.SourceFiles.Length).ToList(); 1257var finalPeFilePath = Arguments.GetOutputFilePath(outputName); 1258var finalPdbFilePath = Arguments.GetPdbFilePath(outputName); 1259var finalXmlFilePath = Arguments.DocumentationPath; 1266var emitOptions = Arguments.EmitOptions. 1268WithPdbFilePath(PathUtilities.NormalizePathPrefix(finalPdbFilePath, Arguments.PathMap)); 1273if (Arguments.ParseOptions.HasFeature(Feature.PdbPathDeterminism) && !string.IsNullOrEmpty(emitOptions.PdbFilePath)) 1278if (Arguments.SourceLink != null) 1281Arguments.SourceLink, 1291Arguments.SourceLink, 1297if (Arguments.ParseOptions.HasFeature(Feature.DebugDeterminism)) 1305Arguments.PathMap, 1308Arguments.ManifestResources); 1322Arguments.ManifestResources, 1338Arguments.EmitPdb, 1396using (var win32ResourceStreamOpt = GetWin32Resources(FileSystem, MessageProvider, Arguments, compilation, diagnostics)) 1457var pdbStreamProviderOpt = Arguments.EmitPdbFile ? new CompilerEmitStreamProvider(this, finalPdbFilePath) : null; 1459string? finalRefPeFilePath = Arguments.OutputRefFilePath; 1545if (Arguments.ErrorLogPath == null) 1554reportAnalyzer: Arguments.ReportAnalyzer || errorLogger != null, 1574if (Arguments.TouchedFilesPath != null) 1583string readFilesPath = Arguments.TouchedFilesPath + ".read"; 1584string writtenFilesPath = Arguments.TouchedFilesPath + ".write"; 1625foreach (var file in Arguments.AdditionalFiles) 1761return Arguments.PreferredUILang ?? CultureInfo.CurrentUICulture; 1818var 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.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\roslyn\src\Compilers\Server\VBCSCompiler\CompilerRequestHandler.cs (2)
142if (!AnalyzerConsistencyChecker.Check(request.WorkingDirectory, compiler.Arguments.AnalyzerReferences, AnalyzerAssemblyLoader, Logger, out List<string>? errorMessages)) 152bool utf8output = compiler.Arguments.Utf8Output;