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