2 types derived from CompilationOptions
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
22public sealed class CSharpCompilationOptions : CompilationOptions, IEquatable<CSharpCompilationOptions>
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicCompilationOptions.vb (1)
16Inherits CompilationOptions
470 references to CompilationOptions
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
52var modifiedCompilationOptions = project.CompilationOptions.WithSpecificDiagnosticOptions(modifiedSpecificDiagnosticOptions);
BuildActionTelemetryTable (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
36CompilationOptions compilationOptions, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions)
Microsoft.AspNetCore.Analyzer.Testing (7)
CodeFixRunner.cs (3)
46var compilationOptions = ConfigureCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); 67protected virtual CompilationOptions ConfigureCompilationOptions(CompilationOptions options)
DiagnosticAnalyzerRunner.cs (3)
65var options = ConfigureCompilationOptions(compilation.Options); 116protected virtual CompilationOptions ConfigureCompilationOptions(CompilationOptions options)
DiagnosticVerifier.cs (1)
85var options = compilation.Options;
Microsoft.AspNetCore.App.Analyzers.Test (2)
TestDiagnosticAnalyzer.cs (2)
171protected override CompilationOptions ConfigureCompilationOptions(CompilationOptions options)
Microsoft.CodeAnalysis (102)
CommandLine\CommandLineArguments.cs (3)
298public CompilationOptions CompilationOptions 304protected abstract CompilationOptions CompilationOptionsCore { get; } 475CompilationOptions compilationOptions,
CommandLine\CommonCompiler.cs (1)
120CompilationOptions compilationOptions,
Compilation\Compilation.cs (12)
195CompilationOptions compilationOptions, 264internal static void CheckSubmissionOptions(CompilationOptions? options) 402/// Unless <see cref="CompilationOptions.ModuleName"/> specifies otherwise the module name 403/// written to metadata is <see cref="AssemblyName"/> with an extension based upon <see cref="CompilationOptions.OutputKind"/>. 448public CompilationOptions Options { get { return CommonOptions; } } 450protected abstract CompilationOptions CommonOptions { get; } 457public Compilation WithOptions(CompilationOptions options) 462protected abstract Compilation CommonWithOptions(CompilationOptions options); 1037/// full name of the container class stored in <see cref="CompilationOptions.ScriptClassName"/> to find the symbol. 2203CompilationOptions compilationOptions = this.Options; 2221if (emitOptions.FileAlignment == 0 || !CompilationOptions.IsValidFileAlignment(emitOptions.FileAlignment)) 2764/// The CLR starts executing the static Main method of <see cref="CompilationOptions.MainTypeName"/> type. When the first breakpoint is hit
Compilation\CompilationOptions.cs (57)
334internal bool CanReuseCompilationReferenceManager(CompilationOptions other) 382public CompilationOptions WithGeneralDiagnosticOption(ReportDiagnostic value) 390public CompilationOptions WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? value) 398public CompilationOptions WithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>> value) 406public CompilationOptions WithReportSuppressedDiagnostics(bool value) 414public CompilationOptions WithConcurrentBuild(bool concurrent) 422public CompilationOptions WithDeterministic(bool deterministic) 430public CompilationOptions WithOutputKind(OutputKind kind) 438public CompilationOptions WithPlatform(Platform platform) 446public CompilationOptions WithPublicSign(bool publicSign) => CommonWithPublicSign(publicSign); 451public CompilationOptions WithOptimizationLevel(OptimizationLevel value) 456public CompilationOptions WithXmlReferenceResolver(XmlReferenceResolver? resolver) 461public CompilationOptions WithSourceReferenceResolver(SourceReferenceResolver? resolver) 466public CompilationOptions WithSyntaxTreeOptionsProvider(SyntaxTreeOptionsProvider? provider) 471public CompilationOptions WithMetadataReferenceResolver(MetadataReferenceResolver? resolver) 476public CompilationOptions WithAssemblyIdentityComparer(AssemblyIdentityComparer comparer) 481public CompilationOptions WithStrongNameProvider(StrongNameProvider? provider) 486public CompilationOptions WithModuleName(string? moduleName) 491public CompilationOptions WithMainTypeName(string? mainTypeName) 496public CompilationOptions WithScriptClassName(string scriptClassName) 501public CompilationOptions WithCryptoKeyContainer(string? cryptoKeyContainer) 506public CompilationOptions WithCryptoKeyFile(string? cryptoKeyFile) 511public CompilationOptions WithCryptoPublicKey(ImmutableArray<byte> cryptoPublicKey) 516public CompilationOptions WithDelaySign(bool? delaySign) 521public CompilationOptions WithOverflowChecks(bool checkOverflow) 526public CompilationOptions WithMetadataImportOptions(MetadataImportOptions value) => CommonWithMetadataImportOptions(value); 528protected abstract CompilationOptions CommonWithConcurrentBuild(bool concurrent); 529protected abstract CompilationOptions CommonWithDeterministic(bool deterministic); 530protected abstract CompilationOptions CommonWithOutputKind(OutputKind kind); 531protected abstract CompilationOptions CommonWithPlatform(Platform platform); 532protected abstract CompilationOptions CommonWithPublicSign(bool publicSign); 533protected abstract CompilationOptions CommonWithOptimizationLevel(OptimizationLevel value); 534protected abstract CompilationOptions CommonWithXmlReferenceResolver(XmlReferenceResolver? resolver); 535protected abstract CompilationOptions CommonWithSourceReferenceResolver(SourceReferenceResolver? resolver); 536protected abstract CompilationOptions CommonWithSyntaxTreeOptionsProvider(SyntaxTreeOptionsProvider? resolver); 537protected abstract CompilationOptions CommonWithMetadataReferenceResolver(MetadataReferenceResolver? resolver); 538protected abstract CompilationOptions CommonWithAssemblyIdentityComparer(AssemblyIdentityComparer? comparer); 539protected abstract CompilationOptions CommonWithStrongNameProvider(StrongNameProvider? provider); 540protected abstract CompilationOptions CommonWithGeneralDiagnosticOption(ReportDiagnostic generalDiagnosticOption); 541protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? specificDiagnosticOptions); 542protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptions); 543protected abstract CompilationOptions CommonWithReportSuppressedDiagnostics(bool reportSuppressedDiagnostics); 544protected abstract CompilationOptions CommonWithModuleName(string? moduleName); 545protected abstract CompilationOptions CommonWithMainTypeName(string? mainTypeName); 546protected abstract CompilationOptions CommonWithScriptClassName(string scriptClassName); 547protected abstract CompilationOptions CommonWithCryptoKeyContainer(string? cryptoKeyContainer); 548protected abstract CompilationOptions CommonWithCryptoKeyFile(string? cryptoKeyFile); 549protected abstract CompilationOptions CommonWithCryptoPublicKey(ImmutableArray<byte> cryptoPublicKey); 550protected abstract CompilationOptions CommonWithDelaySign(bool? delaySign); 551protected abstract CompilationOptions CommonWithCheckOverflow(bool checkOverflow); 552protected abstract CompilationOptions CommonWithMetadataImportOptions(MetadataImportOptions value); 555protected abstract CompilationOptions CommonWithFeatures(ImmutableArray<string> features); 613protected bool EqualsHelper([NotNullWhen(true)] CompilationOptions? other) 701public static bool operator ==(CompilationOptions? left, CompilationOptions? right) 706public static bool operator !=(CompilationOptions? left, CompilationOptions? right)
Compilation\DeterministicKey.cs (2)
51CompilationOptions compilationOptions, 78CompilationOptions compilationOptions,
Compilation\DeterministicKeyBuilder.cs (4)
121CompilationOptions compilationOptions, 199CompilationOptions compilationOptions, 432private void WriteCompilationOptions(JsonWriter writer, CompilationOptions options) 439protected virtual void WriteCompilationOptionsCore(JsonWriter writer, CompilationOptions options)
Diagnostic\CommonMessageProvider.cs (2)
127public abstract ReportDiagnostic GetDiagnosticReport(DiagnosticInfo diagnosticInfo, CompilationOptions options); 133public DiagnosticInfo? FilterDiagnosticInfo(DiagnosticInfo diagnosticInfo, CompilationOptions options)
Diagnostic\DiagnosticDescriptor.cs (2)
232/// Gets the effective severity of diagnostics created based on this descriptor and the given <see cref="CompilationOptions"/>. 235public ReportDiagnostic GetEffectiveSeverity(CompilationOptions compilationOptions)
Diagnostic\SuppressionDescriptor.cs (2)
99/// Returns a flag indicating if the suppression is disabled for the given <see cref="CompilationOptions"/>. 102internal bool IsDisabled(CompilationOptions compilationOptions)
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
2358internal async Task<AnalyzerActionCounts> GetAnalyzerActionCountsAsync(DiagnosticAnalyzer analyzer, CompilationOptions compilationOptions, AnalysisScope analysisScope, CancellationToken cancellationToken) 2379CompilationOptions options,
DiagnosticAnalyzer\AnalyzerManager.cs (2)
300CompilationOptions options, 342CompilationOptions options,
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (5)
1152/// 1) <see cref="CompilationOptions.SpecificDiagnosticOptions"/> specified for the given <paramref name="compilation"/>. 1153/// 2) <see cref="CompilationOptions.GeneralDiagnosticOption"/> specified for the given <paramref name="compilation"/>. 1162/// 1) <see cref="CompilationOptions.SpecificDiagnosticOptions"/> specified for the given <paramref name="compilation"/>. 1163/// 2) <see cref="CompilationOptions.GeneralDiagnosticOption"/> specified for the given <paramref name="compilation"/>. 1220CompilationOptions options,
NativePdbWriter\PdbWriter.cs (1)
81var compilationOptions = Context.Module.CommonCompilation.Options;
SourceGeneration\IncrementalContexts.cs (1)
55internal IncrementalValueProvider<CompilationOptions> CompilationOptionsProvider
SourceGeneration\ISyntaxHelper.cs (2)
33void AddAliases(CompilationOptions options, ArrayBuilder<(string aliasName, string symbolName)> aliases); 58public abstract void AddAliases(CompilationOptions options, ArrayBuilder<(string aliasName, string symbolName)> aliases);
SourceGeneration\Nodes\SharedInputNodes.cs (1)
20public static readonly InputNode<CompilationOptions> CompilationOptions = new(b => ImmutableArray.Create(b.Compilation.Options), ReferenceEqualityComparer.Instance);
StrongName\StrongNameKeys.cs (3)
44/// <see cref="CompilationOptions.CryptoKeyContainer"/>. 53/// <see cref="CompilationOptions.CryptoKeyFile"/> 99nameof(CompilationOptions.CryptoPublicKey), BitConverter.ToString(publicKey.ToArray())));
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (4)
96protected bool ShouldSkipAnalysis(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions, NotificationOption2? notification) 111CompilationOptions compilationOptions, 119CompilationOptions compilationOptions, 149CompilationOptions compilationOptions,
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
34private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
42private void HandleSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
41private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
41private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
42private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
202private bool TryGetOptions(SyntaxTree syntaxTree, AnalyzerOptions analyzerOptions, CompilationOptions compilationOptions, CancellationToken cancellationToken, out Options options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
36CompilationOptions compilationOptions, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (1)
101protected override CompilationOptions CreateCompilationOptions()
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeRefactoringVerifier`1+Test.cs (1)
109protected override CompilationOptions CreateCompilationOptions()
Microsoft.CodeAnalysis.CSharp (38)
CommandLine\CSharpCommandLineArguments.cs (1)
28protected override CompilationOptions CompilationOptionsCore
CommandLine\CSharpCommandLineParser.cs (1)
1199else if (!CompilationOptions.IsValidFileAlignment(newAlignment))
CommandLine\CSharpCompiler.cs (1)
336CompilationOptions compilationOptions,
Compilation\CSharpCompilation.cs (3)
1549/// full name of the container class stored in <see cref="CompilationOptions.ScriptClassName"/> to find the symbol. 3920protected override CompilationOptions CommonOptions 3959protected override Compilation CommonWithOptions(CompilationOptions options)
Compilation\CSharpDeterministicKeyBuilder.cs (1)
20protected override void WriteCompilationOptionsCore(JsonWriter writer, CompilationOptions options)
CSharpCompilationOptions.cs (26)
443protected override CompilationOptions CommonWithGeneralDiagnosticOption(ReportDiagnostic value) => WithGeneralDiagnosticOption(value); 445protected override CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? specificDiagnosticOptions) => 448protected override CompilationOptions CommonWithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions) => 451protected override CompilationOptions CommonWithReportSuppressedDiagnostics(bool reportSuppressedDiagnostics) => 624protected override CompilationOptions CommonWithConcurrentBuild(bool concurrent) => WithConcurrentBuild(concurrent); 625protected override CompilationOptions CommonWithDeterministic(bool deterministic) => WithDeterministic(deterministic); 627protected override CompilationOptions CommonWithOutputKind(OutputKind kind) => WithOutputKind(kind); 629protected override CompilationOptions CommonWithPlatform(Platform platform) => WithPlatform(platform); 631protected override CompilationOptions CommonWithPublicSign(bool publicSign) => WithPublicSign(publicSign); 633protected override CompilationOptions CommonWithOptimizationLevel(OptimizationLevel value) => WithOptimizationLevel(value); 635protected override CompilationOptions CommonWithAssemblyIdentityComparer(AssemblyIdentityComparer? comparer) => 638protected override CompilationOptions CommonWithXmlReferenceResolver(XmlReferenceResolver? resolver) => 641protected override CompilationOptions CommonWithSourceReferenceResolver(SourceReferenceResolver? resolver) => 644protected override CompilationOptions CommonWithSyntaxTreeOptionsProvider(SyntaxTreeOptionsProvider? provider) 647protected override CompilationOptions CommonWithMetadataReferenceResolver(MetadataReferenceResolver? resolver) => 650protected override CompilationOptions CommonWithStrongNameProvider(StrongNameProvider? provider) => 653protected override CompilationOptions CommonWithMetadataImportOptions(MetadataImportOptions value) => 657protected override CompilationOptions CommonWithFeatures(ImmutableArray<string> features) 773protected override CompilationOptions CommonWithModuleName(string? moduleName) 778protected override CompilationOptions CommonWithMainTypeName(string? mainTypeName) 783protected override CompilationOptions CommonWithScriptClassName(string? scriptClassName) 788protected override CompilationOptions CommonWithCryptoKeyContainer(string? cryptoKeyContainer) 793protected override CompilationOptions CommonWithCryptoKeyFile(string? cryptoKeyFile) 798protected override CompilationOptions CommonWithCryptoPublicKey(ImmutableArray<byte> cryptoPublicKey) 803protected override CompilationOptions CommonWithDelaySign(bool? delaySign) 808protected override CompilationOptions CommonWithCheckOverflow(bool checkOverflow)
Errors\MessageProvider.cs (1)
120public override ReportDiagnostic GetDiagnosticReport(DiagnosticInfo diagnosticInfo, CompilationOptions options)
SourceGeneration\CSharpSyntaxHelper.cs (1)
110public override void AddAliases(CompilationOptions compilation, ArrayBuilder<(string aliasName, string symbolName)> aliases)
Syntax\CSharpSyntaxTree.cs (3)
326/// <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param> 447/// <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param> 486/// <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param>
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
20public static bool IsApplication(CompilationOptions options)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpInteractiveEvaluatorLanguageInfoProvider.cs (1)
35public override CompilationOptions GetSubmissionCompilationOptions(string name, MetadataReferenceResolver metadataReferenceResolver, SourceReferenceResolver sourceReferenceResolver, ImmutableArray<string> imports)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
267var options = compilationFactory.GetDefaultCompilationOptions().WithOutputKind(OutputKind.DynamicallyLinkedLibrary);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenAsyncTests.cs (1)
63CompilationOptions options;
Microsoft.CodeAnalysis.CSharp.Features (7)
ExtractInterface\CSharpExtractInterfaceService.cs (1)
50internal override string GetContainingNamespaceDisplay(INamedTypeSymbol typeSymbol, CompilationOptions compilationOptions)
GenerateType\CSharpGenerateTypeService.cs (1)
527public override string GetRootNamespace(CompilationOptions options)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
20public static bool IsApplication(CompilationOptions options)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (2)
4696protected override CompilationOptions CreateCompilationOptions() 4739protected override CompilationOptions CreateCompilationOptions()
Diagnostics\Suppression\SuppressionTests.cs (2)
759var compilationOptions = solution.Projects.Single().CompilationOptions; 1001var compilationOptions = solution.Projects.Single().CompilationOptions;
EncapsulateField\EncapsulateFieldTests.cs (1)
39CompilationOptions? compilationOptions = null,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\WarningVersionTests.cs (1)
14/// Tests that exercise warnings that are under control of the compiler option <see cref="CompilationOptions.WarningLevel"/>
SourceGeneration\GeneratorDriverTests.cs (1)
1201void verifyDiagnosticsWithOptions(CompilationOptions options, params DiagnosticDescription[] expected)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Compilation\CSharpCompilationOptionsTests.cs (6)
31/// Using an instance of <see cref="CSharpCompilationOptions"/>, tests a property in <see cref="CompilationOptions"/> , even it is hidden by <see cref="CSharpCompilationOptions"/>. 34Func<CompilationOptions, T, CompilationOptions> factory, 35Func<CompilationOptions, T> getter, 43where TOptions : CompilationOptions 357/// If this test fails, please update the <see cref="CompilationOptions.GetHashCode"/>
Symbols\Metadata\MetadataMemberTests.cs (2)
708var commonOptions = (CompilationOptions)options;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
MockCSharpCompiler.cs (1)
45CompilationOptions compilationOptions,
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
666protected override string GetRootNamespace(CompilationOptions compilationOptions)
Serialization\CSharpOptionsSerializationService.cs (2)
26public override void WriteTo(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken) 45public override CompilationOptions ReadCompilationOptionsFrom(ObjectReader reader, CancellationToken cancellationToken)
Workspace\LanguageServices\CSharpCompilationFactoryService.cs (4)
26Compilation ICompilationFactoryService.CreateCompilation(string assemblyName, CompilationOptions options) 33Compilation ICompilationFactoryService.CreateSubmissionCompilation(string assemblyName, CompilationOptions options, Type? hostObjectType) 42CompilationOptions ICompilationFactoryService.GetDefaultCompilationOptions() 45CompilationOptions? ICompilationFactoryService.TryParsePdbCompilationOptions(IReadOnlyDictionary<string, string> compilationOptionsMetadata)
Microsoft.CodeAnalysis.EditorFeatures (2)
Interactive\InteractiveEvaluatorLanguageInfoProvider.cs (1)
13public abstract CompilationOptions GetSubmissionCompilationOptions(string name, MetadataReferenceResolver metadataReferenceResolver, SourceReferenceResolver sourceReferenceResolver, ImmutableArray<string> imports);
Interactive\InteractiveSession.cs (1)
260CompilationOptions compilationOptions;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (16)
ExtractInterface\AbstractExtractInterfaceTests.cs (2)
96CompilationOptions compilationOptions = null) 157CompilationOptions compilationOptions = null)
ExtractInterface\ExtractInterfaceTestState.cs (1)
37CompilationOptions compilationOptions = null,
Workspaces\EditorTestHostProject.cs (3)
16CompilationOptions? compilationOptions, 51CompilationOptions? compilationOptions = null, 82CompilationOptions? compilationOptions = null,
Workspaces\EditorTestWorkspace.cs (1)
78CompilationOptions? compilationOptions,
Workspaces\EditorTestWorkspace_Create.cs (9)
45CompilationOptions compilationOptions, 59CompilationOptions compilationOptions, 70CompilationOptions compilationOptions, 79CompilationOptions compilationOptions, 98CompilationOptions compilationOptions, 118CompilationOptions compilationOptions = null, 131CompilationOptions compilationOptions = null, 147CompilationOptions compilationOptions = null, 159CompilationOptions compilationOptions = null,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.cs (1)
990private static TestWorkspace CreateWorkspaceFromFile(string file, bool isVisualBasic, ParseOptions parseOptions, CompilationOptions compilationOptions)
Microsoft.CodeAnalysis.Features (20)
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
27public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions options)
ExtractInterface\AbstractExtractInterfaceService.cs (1)
47internal abstract string GetContainingNamespaceDisplay(INamedTypeSymbol typeSymbol, CompilationOptions compilationOptions);
GenerateType\AbstractGenerateTypeService.cs (1)
67public abstract string GetRootNamespace(CompilationOptions options);
GenerateType\IGenerateTypeService.cs (1)
18string GetRootNamespace(CompilationOptions options);
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
63var compilationOptions = services.GetRequiredLanguageService<ICompilationFactoryService>(LanguageName).GetDefaultCompilationOptions().WithOutputKind(OutputKind.DynamicallyLinkedLibrary);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
307var compilationOptions = languageServices.GetRequiredService<ICompilationFactoryService>().TryParsePdbCompilationOptions(pdbCompilationOptions);
SemanticSearch\SemanticSearchProjectConfiguration.cs (1)
14public required CompilationOptions CompilationOptions { get; init; }
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (4)
96protected bool ShouldSkipAnalysis(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions, NotificationOption2? notification) 111CompilationOptions compilationOptions, 119CompilationOptions compilationOptions, 149CompilationOptions compilationOptions,
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
34private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
42private void HandleSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
41private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
41private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
42private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
202private bool TryGetOptions(SyntaxTree syntaxTree, AnalyzerOptions analyzerOptions, CompilationOptions compilationOptions, CancellationToken cancellationToken, out Options options)
Workspace\MiscellaneousFileUtilities.cs (2)
82private static CompilationOptions GetCompilationOptionsWithScriptReferenceResolvers(SolutionServices services, CompilationOptions compilationOptions, string filePath)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
214var options = project.CompilationOptions;
Microsoft.CodeAnalysis.Rebuild (4)
CompilationFactory.cs (2)
24public CompilationOptions CompilationOptions => CommonCompilationOptions; 27protected abstract CompilationOptions CommonCompilationOptions { get; }
CSharpCompilationFactory.cs (1)
23protected override CompilationOptions CommonCompilationOptions => CompilationOptions;
VisualBasicCompilationFactory.cs (1)
26protected override CompilationOptions CommonCompilationOptions => CompilationOptions;
Microsoft.CodeAnalysis.Rebuild.UnitTests (22)
BasicDeterministicKeyBuilderTests.cs (1)
60verifyCount<CompilationOptions>(63);
CSharpDeterministicKeyBuilderTests.cs (1)
59verifyCount<CompilationOptions>(63);
DeterministicKeyBuilderTests.cs (6)
30where TCompilationOptions : CompilationOptions 168protected JObject GetCompilationOptionsValue(CompilationOptions options) 309var options = GetCompilationOptions() 337var options = GetCompilationOptions() 370var other = options 406var options = GetCompilationOptions()
RoundTripUtil.cs (14)
216public static void VerifyCompilationOptions(CompilationOptions originalOptions, CompilationOptions rebuildOptions) 223case nameof(CompilationOptions.GeneralDiagnosticOption): 224case nameof(CompilationOptions.Features): 225case nameof(CompilationOptions.ModuleName): 226case nameof(CompilationOptions.MainTypeName): 227case nameof(CompilationOptions.ConcurrentBuild): 228case nameof(CompilationOptions.WarningLevel): 229case nameof(CompilationOptions.SyntaxTreeOptionsProvider): 230case nameof(CompilationOptions.MetadataReferenceResolver): 231case nameof(CompilationOptions.XmlReferenceResolver): 232case nameof(CompilationOptions.SourceReferenceResolver): 233case nameof(CompilationOptions.StrongNameProvider): 234case nameof(CompilationOptions.AssemblyIdentityComparer):
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Host\AssetProvider.cs (1)
195tasks.Add(SynchronizeProjectAssetAsync<CompilationOptions>(new(AssetPathKind.ProjectCompilationOptions, projectId), static p => p.CompilationOptions));
Host\RemoteWorkspace.SolutionCreator.cs (2)
258await _assetProvider.GetAssetsAsync<CompilationOptions>( 351await _assetProvider.GetAssetAsync<CompilationOptions>(
Microsoft.CodeAnalysis.Remote.Workspaces (1)
AbstractAssetProvider.cs (1)
87await GetAssetAsync<CompilationOptions>(new(AssetPathKind.ProjectCompilationOptions, projectId), projectChecksums.CompilationOptions, cancellationToken).ConfigureAwait(false));
Microsoft.CodeAnalysis.Test.Utilities (5)
Diagnostics\DiagnosticExtensions.cs (3)
334/// 1) <see cref="CompilationOptions.SpecificDiagnosticOptions"/> specified for the given <paramref name="compilation"/>. 335/// 2) <see cref="CompilationOptions.GeneralDiagnosticOption"/> specified for the given <paramref name="compilation"/>. 348public static bool IsDiagnosticAnalyzerSuppressed(this DiagnosticAnalyzer analyzer, CompilationOptions options)
Mocks\TestMessageProvider.cs (1)
36public override ReportDiagnostic GetDiagnosticReport(DiagnosticInfo diagnosticInfo, CompilationOptions options)
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
47internal static void AssertCommonOptions(EmitOptions emitOptions, CompilationOptions compilationOptions, Compilation compilation, ImmutableDictionary<string, string> pdbOptions)
Microsoft.CodeAnalysis.UnitTests (4)
CommonCompilationOptionsTests.cs (4)
15/// If this test fails, please update the <see cref="CompilationOptions.GetHashCodeHelper"/> 16/// and <see cref="CompilationOptions.EqualsHelper(CompilationOptions)"/> methods to 24typeof(CompilationOptions),
Microsoft.CodeAnalysis.VisualBasic (36)
CommandLine\VisualBasicCommandLineArguments.vb (1)
53Protected Overrides ReadOnly Property CompilationOptionsCore As CompilationOptions
CommandLine\VisualBasicCompiler.vb (1)
259compilationOptions As CompilationOptions,
Compilation\VisualBasicCompilation.vb (3)
1944''' Uses the full name of the container class stored in <see cref="CompilationOptions.ScriptClassName"/> to find the symbol. 2744Protected Overrides ReadOnly Property CommonOptions As CompilationOptions 2795Protected Overrides Function CommonWithOptions(options As CompilationOptions) As Compilation
Compilation\VisualBasicDeterministicKeyBuilder.vb (1)
64Protected Overrides Sub WriteCompilationOptionsCore(writer As JsonWriter, options As CompilationOptions)
Errors\MessageProvider.vb (1)
116Public Overrides Function GetDiagnosticReport(diagnosticInfo As DiagnosticInfo, options As CompilationOptions) As ReportDiagnostic
SourceGeneration\VisualBasicSyntaxHelper.vb (1)
103Public Overrides Sub AddAliases(options As CompilationOptions, aliases As ArrayBuilder(Of (aliasName As String, symbolName As String)))
Syntax\VisualBasicSyntaxTree.vb (2)
159''' <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param> 234''' <param name="diagnosticOptions">An obsolete parameter. Diagnostic options should now be passed with <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/></param>
VisualBasicCompilationOptions.vb (26)
803Protected Overrides Function CommonWithConcurrentBuild(concurrent As Boolean) As CompilationOptions 807Protected Overrides Function CommonWithDeterministic(deterministic As Boolean) As CompilationOptions 811Protected Overrides Function CommonWithGeneralDiagnosticOption(value As ReportDiagnostic) As CompilationOptions 815Protected Overrides Function CommonWithSpecificDiagnosticOptions(specificDiagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic)) As CompilationOptions 819Protected Overrides Function CommonWithSpecificDiagnosticOptions(specificDiagnosticOptions As IEnumerable(Of KeyValuePair(Of String, ReportDiagnostic))) As CompilationOptions 823Protected Overrides Function CommonWithReportSuppressedDiagnostics(reportSuppressedDiagnostics As Boolean) As CompilationOptions 827Protected Overrides Function CommonWithMetadataImportOptions(value As MetadataImportOptions) As CompilationOptions 832Protected Overrides Function CommonWithFeatures(features As ImmutableArray(Of String)) As CompilationOptions 983Protected Overrides Function CommonWithOutputKind(kind As OutputKind) As CompilationOptions 987Protected Overrides Function CommonWithPlatform(platform As Platform) As CompilationOptions 991Protected Overrides Function CommonWithPublicSign(publicSign As Boolean) As CompilationOptions 995Protected Overrides Function CommonWithOptimizationLevel(value As OptimizationLevel) As CompilationOptions 999Protected Overrides Function CommonWithAssemblyIdentityComparer(comparer As AssemblyIdentityComparer) As CompilationOptions 1003Protected Overrides Function CommonWithXmlReferenceResolver(resolver As XmlReferenceResolver) As CompilationOptions 1007Protected Overrides Function CommonWithSourceReferenceResolver(resolver As SourceReferenceResolver) As CompilationOptions 1011Protected Overrides Function CommonWithSyntaxTreeOptionsProvider(provider As SyntaxTreeOptionsProvider) As CompilationOptions 1015Protected Overrides Function CommonWithMetadataReferenceResolver(resolver As MetadataReferenceResolver) As CompilationOptions 1019Protected Overrides Function CommonWithStrongNameProvider(provider As StrongNameProvider) As CompilationOptions 1347Protected Overrides Function CommonWithModuleName(moduleName As String) As CompilationOptions 1351Protected Overrides Function CommonWithMainTypeName(mainTypeName As String) As CompilationOptions 1355Protected Overrides Function CommonWithScriptClassName(scriptClassName As String) As CompilationOptions 1359Protected Overrides Function CommonWithCryptoKeyContainer(cryptoKeyContainer As String) As CompilationOptions 1363Protected Overrides Function CommonWithCryptoKeyFile(cryptoKeyFile As String) As CompilationOptions 1367Protected Overrides Function CommonWithCryptoPublicKey(cryptoPublicKey As ImmutableArray(Of Byte)) As CompilationOptions 1371Protected Overrides Function CommonWithDelaySign(delaySign As Boolean?) As CompilationOptions 1375Protected Overrides Function CommonWithCheckOverflow(checkOverflow As Boolean) As CompilationOptions
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (2)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryParenthesesTests.vb (2)
22Private Shared ReadOnly CheckOverflow As CompilationOptions = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, checkOverflow:=True) 23Private Shared ReadOnly DoNotCheckOverflow As CompilationOptions = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, checkOverflow:=False)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
49Friend Overrides Function GetContainingNamespaceDisplay(typeSymbol As INamedTypeSymbol, compilationOptions As CompilationOptions) As String
GenerateType\VisualBasicGenerateTypeService.vb (1)
371Public Overrides Function GetRootNamespace(options As CompilationOptions) As String
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Compilation\VisualBasicCompilationOptionsTests.vb (5)
16''' Using an instance of <see cref="VisualBasicCompilationOptions"/>, tests a property in <see cref="CompilationOptions"/> , even it is hidden by <see cref="VisualBasicCompilationOptions"/>. 18Private Sub TestHiddenProperty(Of T)(factory As Func(Of CompilationOptions, T, CompilationOptions), 19getter As Func(Of CompilationOptions, T), 58Private Shared Sub TestPropertyGeneric(Of TOptions As CompilationOptions, T)(oldOptions As TOptions,
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Metadata\MetadataMemberTests.vb (1)
957Dim commonOptions = DirectCast(options, CompilationOptions)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
3523Dim ObjCommonCompilationOptions As CompilationOptions = vbpo1
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
MockVisualBasicCompiler.vb (1)
54compilationOptions As CompilationOptions,
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (1)
668Protected Overrides Function GetRootNamespace(compilationOptions As CompilationOptions) As String
Serialization\VisualBasicOptionsSerializationService.vb (2)
21Public Overrides Sub WriteTo(options As CompilationOptions, writer As ObjectWriter, cancellationToken As CancellationToken) 57Public Overrides Function ReadCompilationOptionsFrom(reader As ObjectReader, cancellationToken As CancellationToken) As CompilationOptions
Workspace\LanguageServices\VisualBasicCompilationFactoryService.vb (4)
25options As CompilationOptions) As Compilation Implements ICompilationFactoryService.CreateCompilation 34options As CompilationOptions, 47Public Function GetDefaultCompilationOptions() As CompilationOptions Implements ICompilationFactoryService.GetDefaultCompilationOptions 51Public Function TryParsePdbCompilationOptions(metadata As IReadOnlyDictionary(Of String, String)) As CompilationOptions Implements ICompilationFactoryService.TryParsePdbCompilationOptions
Microsoft.CodeAnalysis.Workspaces (55)
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
86protected abstract string GetRootNamespace(CompilationOptions compilationOptions);
Serialization\AbstractOptionsSerializationService.cs (3)
18public abstract void WriteTo(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken); 21public abstract CompilationOptions ReadCompilationOptionsFrom(ObjectReader reader, CancellationToken cancellationToken); 24protected static void WriteCompilationOptionsTo(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken)
Serialization\IOptionsSerializationService.cs (2)
18void WriteTo(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken); 21CompilationOptions ReadCompilationOptionsFrom(ObjectReader reader, CancellationToken cancellationToken);
Serialization\SerializationExtensions.cs (3)
24CompilationOptions => WellKnownSynchronizationKind.CompilationOptions, 36public static CompilationOptions FixUpCompilationOptions(this ProjectInfo.ProjectAttributes info, CompilationOptions compilationOptions)
Serialization\SerializerService_Asset.cs (2)
23private void SerializeCompilationOptions(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken) 36private CompilationOptions DeserializeCompilationOptions(ObjectReader reader, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
36CompilationOptions compilationOptions, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions)
Workspace\Host\CompilationFactory\ICompilationFactoryService.cs (4)
14Compilation CreateCompilation(string assemblyName, CompilationOptions options); 15Compilation CreateSubmissionCompilation(string assemblyName, CompilationOptions options, Type? hostObjectType); 16CompilationOptions GetDefaultCompilationOptions(); 17CompilationOptions? TryParsePdbCompilationOptions(IReadOnlyDictionary<string, string> compilationOptionsMetadata);
Workspace\Host\ISupportedChangesService.cs (4)
21bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project); 44public bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project)
Workspace\ProjectSystem\ProjectSystemProject.cs (3)
81private CompilationOptions? _compilationOptions; 165CompilationOptions? compilationOptions, 359public CompilationOptions? CompilationOptions
Workspace\ProjectSystem\ProjectSystemProjectCreationInfo.cs (1)
12public CompilationOptions? CompilationOptions { get; set; }
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (5)
198var compilationOptions = _commandLineArgumentsForCommandLine.CompilationOptions 269/// Overridden by derived classes to provide a hook to modify a <see cref="CompilationOptions"/> with any host-provided values that didn't come from 272protected virtual CompilationOptions ComputeCompilationOptionsWithHostValues(CompilationOptions compilationOptions, IRuleSetFile? ruleSetFile) 284/// by either <see cref="ComputeCompilationOptionsWithHostValues(CompilationOptions, IRuleSetFile)"/> or <see cref="ComputeParseOptionsWithHostValues(ParseOptions)"/>.
Workspace\Solution\Project.cs (2)
160public CompilationOptions? CompilationOptions => State.CompilationOptions; 599public Project WithCompilationOptions(CompilationOptions options)
Workspace\Solution\ProjectInfo.cs (8)
114public CompilationOptions? CompilationOptions { get; } 158CompilationOptions? compilationOptions, 192CompilationOptions? compilationOptions, 220CompilationOptions? compilationOptions = null, 261CompilationOptions? compilationOptions = null, 286Optional<CompilationOptions?> compilationOptions = default, 297var newCompilationOptions = compilationOptions.HasValue ? compilationOptions.Value : CompilationOptions; 370public ProjectInfo WithCompilationOptions(CompilationOptions? compilationOptions)
Workspace\Solution\ProjectState.cs (3)
658public CompilationOptions? CompilationOptions => this.ProjectInfo.CompilationOptions; 760public ProjectState WithCompilationOptions(CompilationOptions? options) 905.WithCompilationOptions(CompilationOptions.WithSyntaxTreeOptionsProvider(newProvider));
Workspace\Solution\Solution.cs (1)
478public Solution WithProjectCompilationOptions(ProjectId projectId, CompilationOptions options)
Workspace\Solution\SolutionCompilationState.cs (1)
488ProjectId projectId, CompilationOptions? options)
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (1)
117/// Updating editorconfig document updates <see cref="CompilationOptions.SyntaxTreeOptionsProvider"/>.
Workspace\Solution\SolutionState.cs (1)
638public StateChange WithProjectCompilationOptions(ProjectId projectId, CompilationOptions? options)
Workspace\Workspace.cs (8)
863protected internal void OnCompilationOptionsChanged(ProjectId projectId, CompilationOptions options) 1667var newOptionsWithoutSyntaxTreeOptionsChange = 1794/// <param name="oldOptions">The old <see cref="CompilationOptions"/> of the project from prior to the change.</param> 1795/// <param name="newOptions">The new <see cref="CompilationOptions"/> of the project that was passed to <see cref="TryApplyChanges(Solution)"/>.</param> 1797public virtual bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project) 1828var newOptionsWithoutSyntaxTreeOptionsChange = 2052protected virtual void ApplyCompilationOptionsChanged(ProjectId projectId, CompilationOptions options)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
351var compilationOptions = commandLineArgs.CompilationOptions
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (31)
Workspaces\TestHostProject.cs (5)
18CompilationOptions compilationOptions, 27CompilationOptions compilationOptions, 46CompilationOptions compilationOptions = null, 59CompilationOptions compilationOptions, 93CompilationOptions compilationOptions = null,
Workspaces\TestHostProject`1.cs (3)
53public CompilationOptions CompilationOptions { get; } 91CompilationOptions compilationOptions, 128CompilationOptions compilationOptions = null,
Workspaces\TestHostSolution.cs (1)
16CompilationOptions compilationOptions,
Workspaces\TestWorkspace.cs (1)
63CompilationOptions? compilationOptions,
Workspaces\TestWorkspace_Create.cs (9)
45CompilationOptions compilationOptions, 59CompilationOptions compilationOptions, 70CompilationOptions compilationOptions, 79CompilationOptions compilationOptions, 98CompilationOptions compilationOptions, 118CompilationOptions compilationOptions = null, 131CompilationOptions compilationOptions = null, 147CompilationOptions compilationOptions = null, 159CompilationOptions compilationOptions = null,
Workspaces\TestWorkspace_XmlConsumption.cs (6)
155var compilationOptions = CreateCompilationOptions(projectElement, language, parseOptions); 377private string GetRootNamespace(CompilationOptions compilationOptions, XElement projectElement) 395private CompilationOptions CreateCompilationOptions( 406private CompilationOptions CreateCompilationOptions(string language, XElement compilationOptionsElement, ParseOptions parseOptions) 515var compilationOptions = languageServices.GetService<ICompilationFactoryService>().GetDefaultCompilationOptions(); 768var options = compilationFactory.GetDefaultCompilationOptions().WithOutputKind(OutputKind.DynamicallyLinkedLibrary);
Workspaces\TestWorkspace_XmlCreation.cs (3)
21CompilationOptions compilationOptions = null, 88CompilationOptions compilationOptions, 143private static XElement CreateCompilationOptionsElement(CompilationOptions options)
Workspaces\TestWorkspace`1.cs (3)
203CompilationOptions? compilationOptions, 606CompilationOptions? compilationOptions = null, 774var compilationOptions = compilationFactory.GetDefaultCompilationOptions()
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
BatchFixAllProviderTests.cs (1)
149protected override CompilationOptions CreateCompilationOptions()
Host\LanguageServices\TestCSharpCompilationFactoryServiceWithIncrementalGeneratorTracking.cs (4)
28Compilation ICompilationFactoryService.CreateCompilation(string assemblyName, CompilationOptions options) 35Compilation ICompilationFactoryService.CreateSubmissionCompilation(string assemblyName, CompilationOptions options, Type? hostObjectType) 44CompilationOptions ICompilationFactoryService.GetDefaultCompilationOptions() 47CompilationOptions? ICompilationFactoryService.TryParsePdbCompilationOptions(IReadOnlyDictionary<string, string> compilationOptionsMetadata)
SolutionTests\SolutionTests.cs (1)
1745var defaultOptions = solution.Projects.Single().Services.GetRequiredService<ICompilationFactoryService>().GetDefaultCompilationOptions();
SolutionTests\TryApplyChangesTests.cs (6)
22private readonly Func<CompilationOptions, CompilationOptions, bool>? _canApplyCompilationOptions; 31Func<CompilationOptions, CompilationOptions, bool>? canApplyCompilationOptions = null) 57public override bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project)
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
24var compilationOptions = solution.GetProject(projectId).CompilationOptions;
Microsoft.VisualStudio.LanguageServices (7)
ProjectSystem\VisualStudioWorkspaceImpl.cs (3)
395public override bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, CodeAnalysis.Project project) 482protected override void ApplyCompilationOptionsChanged(ProjectId projectId, CompilationOptions options)
Utilities\ICompilationOptionsChangingService.cs (4)
12bool CanApplyChange(CompilationOptions oldOptions, CompilationOptions newOptions); 14void Apply(CompilationOptions oldOptions, CompilationOptions newOptions, ProjectPropertyStorage storage);
Microsoft.VisualStudio.LanguageServices.CSharp (6)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (2)
53protected override CompilationOptions ComputeCompilationOptionsWithHostValues(CompilationOptions compilationOptions, IRuleSetFile? ruleSetFile)
Utilities\CSharpCompilationOptionsChangingService.cs (4)
24public bool CanApplyChange(CompilationOptions oldOptions, CompilationOptions newOptions) 33public void Apply(CompilationOptions oldOptions, CompilationOptions newOptions, ProjectPropertyStorage storage)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
ProjectSystemShim\CPS\CSharpCompilerOptionsTests.cs (1)
50var options = environment.GetUpdatedCompilationOptionOfSingleProject();
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (1)
177var options = environment.GetUpdatedCompilationOptionOfSingleProject();
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (1)
95var options = environment.GetUpdatedCompilationOptionOfSingleProject();
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
ProjectSystemShim\Framework\TestEnvironment.vb (1)
163Public Function GetUpdatedCompilationOptionOfSingleProject() As CompilationOptions
Microsoft.VisualStudio.LanguageServices.VisualBasic (7)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (3)
53Protected Overrides Function ComputeCompilationOptionsWithHostValues(compilationOptions As CompilationOptions, ruleSetFileOpt As IRuleSetFile) As CompilationOptions 58Public Shared Function ApplyCompilationOptionsFromVBCompilerOptions(compilationOptions As CompilationOptions, compilerOptions As VBCompilerOptions, Optional ruleSetFileOpt As IRuleSetFile = Nothing) As VisualBasicCompilationOptions
Utilities\VisualBasicCompilationOptionsChangingService.vb (4)
20Public Function CanApplyChange(oldOptions As CompilationOptions, newOptions As CompilationOptions) As Boolean Implements ICompilationOptionsChangingService.CanApplyChange 24Public Sub Apply(oldOptions As CompilationOptions, newOptions As CompilationOptions, storage As ProjectPropertyStorage) Implements ICompilationOptionsChangingService.Apply
Mvc.Api.Analyzers.Test (5)
ApiConventionAnalyzerIntegrationTest.cs (3)
305protected override CompilationOptions ConfigureCompilationOptions(CompilationOptions options) 307var compilationOptions = base.ConfigureCompilationOptions(options);
IgnoreCS1701WarningCodeFixRunner.cs (2)
11protected override CompilationOptions ConfigureCompilationOptions(CompilationOptions options)
Roslyn.VisualStudio.Next.UnitTests (1)
Remote\SerializationValidator.cs (1)
143await VerifyAssetSerializationAsync<CompilationOptions>(
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Analyzers\Verifiers\CSharpIncrementalSourceGeneratorVerifier.cs (1)
20var compilationOptions = solution.GetProject(projectId)!.CompilationOptions;