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