2 types derived from ParseOptions
Microsoft.CodeAnalysis.CSharp (1)
CSharpParseOptions.cs (1)
17public sealed class CSharpParseOptions : ParseOptions, IEquatable<CSharpParseOptions>
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicParseOptions.vb (1)
16Inherits ParseOptions
666 references to ParseOptions
IdeBenchmarks (1)
RegexClassifierBenchmarks.cs (1)
69protected Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, TextSpan span, ParseOptions parseOptions)
Microsoft.CodeAnalysis (38)
CommandLine\CommandLineArguments.cs (2)
290public ParseOptions ParseOptions 303protected abstract ParseOptions ParseOptionsCore { get; }
CommandLine\CommonCompiler.cs (3)
807/// <param name="parseOptions">The <see cref="ParseOptions"/> to use when parsing any generated sources.</param> 816ParseOptions parseOptions, 877private protected abstract GeneratorDriver CreateGeneratorDriver(string baseDirectory, ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider, ImmutableArray<AdditionalText> additionalTexts);
Compilation\Compilation.cs (1)
1800/// if <see cref="ParseOptions.DocumentationMode"/> is set to <see cref="DocumentationMode.None"/>.
Compilation\DeterministicKey.cs (2)
17public abstract ParseOptions Options { get; } 40public override ParseOptions Options
Compilation\DeterministicKeyBuilder.cs (2)
509protected void WriteParseOptions(JsonWriter writer, ParseOptions parseOptions) 516protected virtual void WriteParseOptionsCore(JsonWriter writer, ParseOptions parseOptions)
Compilation\ParseOptions.cs (11)
69public ParseOptions WithKind(SourceCodeKind kind) 97public abstract ParseOptions CommonWithKind(SourceCodeKind kind); 102public ParseOptions WithDocumentationMode(DocumentationMode documentationMode) 107protected abstract ParseOptions CommonWithDocumentationMode(DocumentationMode documentationMode); 112public ParseOptions WithFeatures(IEnumerable<KeyValuePair<string, string>> features) 117protected abstract ParseOptions CommonWithFeatures(IEnumerable<KeyValuePair<string, string>> features); 134protected bool EqualsHelper([NotNullWhen(true)] ParseOptions? other) 171public static bool operator ==(ParseOptions? left, ParseOptions? right) 176public static bool operator !=(ParseOptions? left, ParseOptions? right)
SourceGeneration\GeneratorAdaptor.cs (1)
79public ParseOptions? ParseOptions;
SourceGeneration\GeneratorContexts.cs (3)
24internal GeneratorExecutionContext(Compilation compilation, ParseOptions parseOptions, ImmutableArray<AdditionalText> additionalTexts, AnalyzerConfigOptionsProvider optionsProvider, ISyntaxContextReceiver? syntaxReceiver, string sourceExtension, CancellationToken cancellationToken = default) 48/// Get the <see cref="CodeAnalysis.ParseOptions"/> that will be used to parse any added sources. 50public ParseOptions ParseOptions { get; }
SourceGeneration\GeneratorDriver.cs (2)
37internal GeneratorDriver(ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, GeneratorDriverOptions driverOptions) 164public GeneratorDriver WithUpdatedParseOptions(ParseOptions newOptions) => newOptions is object
SourceGeneration\GeneratorDriverState.cs (3)
14internal GeneratorDriverState(ParseOptions parseOptions, 86internal readonly ParseOptions ParseOptions; 112ParseOptions? parseOptions = null,
SourceGeneration\GeneratorState.cs (1)
129internal bool RequiresPostInitReparse(ParseOptions parseOptions) => PostInitTrees.Any(static (t, parseOptions) => t.Tree.Options != parseOptions, parseOptions);
SourceGeneration\IncrementalContexts.cs (2)
60public IncrementalValueProvider<ParseOptions> ParseOptionsProvider => new IncrementalValueProvider<ParseOptions>(SharedInputNodes.ParseOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.ParseOptions), CatchAnalyzerExceptions);
SourceGeneration\Nodes\SharedInputNodes.cs (2)
22public static readonly InputNode<ParseOptions> ParseOptions = new InputNode<ParseOptions>(b => ImmutableArray.Create(b.DriverState.ParseOptions));
Syntax\SyntaxTree.cs (3)
63public ParseOptions Options 74protected abstract ParseOptions OptionsCore { get; } 391public abstract SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options);
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
65protected abstract bool IsSupported(TSyntaxKind assignmentKind, ParseOptions options);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFacts.cs (12)
94bool SupportsIndexingInitializer(ParseOptions options); 95bool SupportsLocalFunctionDeclaration(ParseOptions options); 96bool SupportsNotPattern(ParseOptions options); 97bool SupportsRecord(ParseOptions options); 98bool SupportsRecordStruct(ParseOptions options); 99bool SupportsThrowExpression(ParseOptions options); 100bool SupportsTargetTypedConditionalExpression(ParseOptions options); 101bool SupportsIsNotTypeExpression(ParseOptions options); 102bool SupportsConstantInterpolatedStrings(ParseOptions options); 103bool SupportsTupleDeconstruction(ParseOptions options); 104bool SupportsCollectionExpressionNaturalType(ParseOptions options); 105bool SupportsImplicitImplementationOfNonPublicInterfaceMembers(ParseOptions options);
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
32protected abstract bool AllowDelegateAndEnumConstraints(ParseOptions options);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (4)
108ParseOptions options, 181ParseOptions options, 229ParseOptions options, ISymbol member, string memberName, bool supportsImplementingLessAccessibleMember) 257private bool HasUnexpressibleConstraint(ParseOptions options, ISymbol member)
src\Analyzers\Core\CodeFixes\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (1)
27protected abstract string GetTitle(bool negated, ParseOptions options);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
41public abstract TCodeGenerationContextInfo GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions); 43CodeGenerationContextInfo ICodeGenerationService.GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (1)
18CodeGenerationContextInfo GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (4)
36ParseOptions parseOptions, 113ParseOptions parseOptions, 275ParseOptions parseOptions, 323SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, ParseOptions parseOptions, SyntaxNode otherNameExpression, ArrayBuilder<SyntaxNode> expressions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
65var options = semanticModel.SyntaxTree.Options;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxGeneratorInternalExtensions\SyntaxGeneratorInternal.cs (1)
111public abstract bool SupportsPatterns(ParseOptions options);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractReducer.IExpressionRewriter.cs (1)
16void Initialize(ParseOptions parseOptions, SimplifierOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (2)
12public static bool CanApplyParseOptionChange(this Project project, ParseOptions oldOptions, ParseOptions newOptions)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (4)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (1)
95protected override ParseOptions CreateParseOptions()
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeRefactoringVerifier`1+Test.cs (1)
103protected override ParseOptions CreateParseOptions()
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeFixVerifier`2+Test.cs (1)
86protected override ParseOptions CreateParseOptions()
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeRefactoringVerifier`1+Test.cs (1)
95protected override ParseOptions CreateParseOptions()
Microsoft.CodeAnalysis.CSharp (29)
CommandLine\CSharpCommandLineArguments.cs (1)
23protected override ParseOptions ParseOptionsCore
CommandLine\CSharpCompiler.cs (1)
376private protected override GeneratorDriver CreateGeneratorDriver(string baseDirectory, ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider, ImmutableArray<AdditionalText> additionalTexts)
Compilation\CSharpCompilation.cs (1)
2971var parseOptionsReported = new HashSet<ParseOptions>();
Compilation\CSharpDeterministicKeyBuilder.cs (1)
40protected override void WriteParseOptionsCore(JsonWriter writer, ParseOptions parseOptions)
CSharpParseOptions.cs (3)
145public override ParseOptions CommonWithKind(SourceCodeKind kind) 150protected override ParseOptions CommonWithDocumentationMode(DocumentationMode documentationMode) 155protected override ParseOptions CommonWithFeatures(IEnumerable<KeyValuePair<string, string>>? features)
Errors\MessageID.cs (2)
406ParseOptions parseOptions, 421ParseOptions parseOptions,
Syntax\CSharpSyntaxTree.cs (1)
897protected override ParseOptions OptionsCore
Syntax\CSharpSyntaxTree.Dummy.cs (1)
94public override SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options)
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
109public override SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options)
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
123public override SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options)
Syntax\SyntaxFactory.cs (16)
1547public static SyntaxTree SyntaxTree(SyntaxNode root, ParseOptions? options = null, string path = "", Encoding? encoding = null) 1557ParseOptions? options = null, 1569ParseOptions? options = null, 1714public static TypeSyntax ParseTypeName(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1733public static ExpressionSyntax ParseExpression(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1752public static StatementSyntax ParseStatement(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1772public static MemberDeclarationSyntax? ParseMemberDeclaration(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1815public static ParameterListSyntax ParseParameterList(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1834public static BracketedParameterListSyntax ParseBracketedParameterList(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1853public static ArgumentListSyntax ParseArgumentList(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1872public static BracketedArgumentListSyntax ParseBracketedArgumentList(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 1891public static AttributeArgumentListSyntax? ParseAttributeArgumentList(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true) 2784ParseOptions? options, 2798ParseOptions? options, 2811ParseOptions? options, 2826ParseOptions? options,
Microsoft.CodeAnalysis.CSharp.CodeStyle (15)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
25protected override bool IsSupported(SyntaxKind assignmentKind, ParseOptions options)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
127var options = semanticModel.SyntaxTree.Options;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParseOptionsExtensions.cs (1)
9public static LanguageVersion LanguageVersion(this ParseOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (12)
48public bool SupportsIndexingInitializer(ParseOptions options) 51public bool SupportsThrowExpression(ParseOptions options) 54public bool SupportsLocalFunctionDeclaration(ParseOptions options) 57public bool SupportsRecord(ParseOptions options) 60public bool SupportsRecordStruct(ParseOptions options) 63public bool SupportsTargetTypedConditionalExpression(ParseOptions options) 66public bool SupportsConstantInterpolatedStrings(ParseOptions options) 69public bool SupportsTupleDeconstruction(ParseOptions options) 73public bool SupportsCollectionExpressionNaturalType(ParseOptions options) 76public bool SupportsImplicitImplementationOfNonPublicInterfaceMembers(ParseOptions options) 1487public bool SupportsNotPattern(ParseOptions options) 1491public bool SupportsIsNotTypeExpression(ParseOptions options)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
38protected override bool AllowDelegateAndEnumConstraints(ParseOptions options)
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (1)
30protected override string GetTitle(bool negated, ParseOptions options)
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\UseIsNullCheckHelpers.cs (2)
11public static string GetTitle(bool negated, ParseOptions options) 25public static bool SupportsIsNotPattern(ParseOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
37public override CSharpCodeGenerationContextInfo GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
194public override bool SupportsPatterns(ParseOptions options)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (25)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
46ParseOptions? parseOptions = null)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests_ThroughMember.cs (1)
47ParseOptions parseOptions = null)
src\Analyzers\CSharp\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.cs (1)
24private static readonly ParseOptions s_strictFeatureFlag = CSharpParseOptions.Default.WithFeatures([KeyValuePairUtil.Create("strict", "true")]);
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (2)
30private static readonly ParseOptions CSharp72ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_2); 31private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (3)
40private Task TestDiagnosticMissingAsync(string initialMarkup, ParseOptions? parseOptions = null) 44private Task TestDiagnosticMissingAsync(string initialMarkup, OptionsCollection? options, ParseOptions? parseOptions = null) 48private Task TestDiagnosticsAsync(string initialMarkup, OptionsCollection? options, ParseOptions? parseOptions, params DiagnosticDescription[] expectedDiagnostics)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.cs (5)
46private protected Task TestMissingInRegularAndScriptAsync(string initialMarkup, OptionsCollection options, ParseOptions parseOptions = null) 48private protected Task TestMissingInRegularAndScriptAsync(string initialMarkup, string optionName, ParseOptions parseOptions = null) 50protected Task TestInRegularAndScriptAsync(string initialMarkup, string expectedMarkup, string optionName, ParseOptions parseOptions = null) 54protected async Task TestInRegularAndScriptWithAllOptionsAsync(string initialMarkup, string expectedMarkup, ParseOptions parseOptions = null) 62protected async Task TestMissingInRegularAndScriptWithAllOptionsAsync(string initialMarkup, ParseOptions parseOptions = null)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (2)
34ParseOptions? parseOptions, 57private async Task TestLanguageVersionNotUpgradedAsync(string initialMarkup, ParseOptions parseOptions, int index = 0)
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (1)
25private readonly ParseOptions CSharp12 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12);
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests_Field.cs (2)
17private readonly ParseOptions CSharp13 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); 18private readonly ParseOptions Preview = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview);
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (2)
22private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 23private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (3)
26private static readonly ParseOptions CSharp7 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7); 27private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 28private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
29private static readonly ParseOptions CSharp72ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_2);
src\Features\CSharpTest\Diagnostics\AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor.cs (1)
23protected override ParseOptions GetScriptOptions() => Script;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Interactive\CSharpInteractiveEvaluatorLanguageInfoProvider.cs (1)
29public override ParseOptions ParseOptions
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (1)
30var options = CSharpInteractiveEvaluatorLanguageInfoProvider.Instance.ParseOptions;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (19)
BraceHighlighting\BraceHighlightingTests.cs (1)
19protected override EditorTestWorkspace CreateWorkspace(string markup, ParseOptions options)
BraceMatching\CSharpBraceMatcherTests.cs (1)
17protected override EditorTestWorkspace CreateWorkspaceFromCode(string code, ParseOptions options)
Classification\AbstractCSharpClassifierTests.cs (1)
17protected static EditorTestWorkspace CreateWorkspace(string code, ParseOptions options, TestHost testHost)
Classification\SemanticClassifierTests.cs (1)
34protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
Classification\SyntacticClassifierTests.cs (1)
21protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
Classification\TotalClassifierTests.cs (1)
32protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
CodeActions\AbstractCSharpCodeActionTest.cs (1)
13protected override ParseOptions GetScriptOptions() => Options.Script;
CodeActions\MoveType\CSharpMoveTypeTestsBase.cs (1)
14protected override ParseOptions GetScriptOptions() => TestOptions.Script;
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
28protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest.cs (1)
20protected override ParseOptions GetScriptOptions() => Options.Script;
ExtractMethod\ExtractMethodBase.cs (1)
31ParseOptions parseOptions = null;
Formatting\CSharpNewDocumentFormattingServiceTests.cs (1)
33protected override EditorTestWorkspace CreateTestWorkspace(string testCode, ParseOptions? parseOptions)
Formatting\FormattingEngineTests.cs (1)
2942ParseOptions? parseOptions = null)
GoToAdjacentMember\CSharpGoToAdjacentMemberTests.cs (1)
20protected override ParseOptions DefaultParseOptions => CSharpParseOptions.Default;
KeywordHighlighting\AbstractCSharpKeywordHighlighterTests.cs (2)
17protected override EditorTestWorkspace CreateWorkspaceFromFile(string code, ParseOptions options) 20protected override IEnumerable<ParseOptions> GetOptions()
MoveToNamespace\MoveToNamespaceTests.cs (1)
31protected override ParseOptions GetScriptOptions() => Options.Script;
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
268var parseOptions = project.ParseOptions;
SignatureHelp\AbstractCSharpSignatureHelpProviderTests.cs (1)
16protected override ParseOptions CreateExperimentalParseOptions()
Microsoft.CodeAnalysis.CSharp.Features (12)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
255private static bool SupportsNonTrailingNamedArguments(ParseOptions options)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.cs (1)
27public override Analyzer CreateAnalyzer(ISyntaxFacts syntaxFacts, ParseOptions options)
ExtractMethod\CSharpSelectionValidator.cs (1)
86private SelectionInfo ApplySpecialCases(SelectionInfo selectionInfo, SourceText text, ParseOptions options, bool localFunction)
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
93ParseOptions options,
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
41ParseOptions parseOptions,
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
25protected override bool IsSupported(SyntaxKind assignmentKind, ParseOptions options)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
127var options = semanticModel.SyntaxTree.Options;
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
38protected override bool AllowDelegateAndEnumConstraints(ParseOptions options)
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (1)
30protected override string GetTitle(bool negated, ParseOptions options)
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\UseIsNullCheckHelpers.cs (2)
11public static string GetTitle(bool negated, ParseOptions options) 25public static bool SupportsIsNotPattern(ParseOptions options)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
35protected override bool SupportsNonTrailingNamedArguments(ParseOptions options)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (54)
CodeActions\AbstractCSharpCodeActionTest_NoEditor.cs (1)
14protected override ParseOptions GetScriptOptions() => TestOptions.Script;
ConvertAnonymousType\ConvertAnonymousTypeToClassTests.cs (1)
20private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
Diagnostics\AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor.cs (1)
23protected override ParseOptions GetScriptOptions() => Script;
Diagnostics\Configuration\ConfigureCodeStyle\BooleanCodeStyleOptionConfigurationTests.cs (1)
24protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureCodeStyle\EnumCodeStyleOptionConfigurationTests.cs (1)
24protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureCodeStyle\MultipleCodeStyleOptionConfigurationTests.cs (1)
35protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
45protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
45protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\CodeStyleOptionBasedSeverityConfigurationTests.cs (1)
24protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\CSharpCodeStyleOptionBasedSeverityConfigurationTests.cs (1)
24protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
45protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\MultipleCodeStyleOptionBasedSeverityConfigurationTests.cs (1)
24protected override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Configuration\ConfigureSeverity\VarForBuiltInTypesSeverityConfigurationTests.cs (1)
24protected override ParseOptions GetScriptOptions() => Options.Regular;
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
48protected sealed override ParseOptions GetScriptOptions() => Options.Script;
Diagnostics\Suppression\SuppressionAllCodeTests.cs (1)
27protected override TestWorkspace CreateWorkspaceFromFile(string definition, ParseOptions parseOptions)
Diagnostics\Suppression\SuppressionTests.cs (1)
33protected override ParseOptions GetScriptOptions() => Options.Script;
EditAndContinue\BreakpointSpansTests.cs (2)
26private static void TestSpan(string markup, ParseOptions options = null) 35private static void Test(string markup, bool isMissing, bool isLine, ParseOptions options = null)
EncapsulateField\EncapsulateFieldTests.cs (1)
38ParseOptions? parseOptions = null,
InvertLogical\InvertLogicalTests.cs (3)
19private static readonly ParseOptions CSharp6 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6); 20private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 21private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
MakeLocalFunctionStatic\MakeLocalFunctionStaticRefactoringTests.cs (2)
22private static readonly ParseOptions CSharp72ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_2); 23private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProviderTests.cs (2)
29private static readonly ParseOptions CSharp72ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_2); 30private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyTests.cs (1)
25ParseOptions? parseOptions = null, int index = 0)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
46ParseOptions? parseOptions = null)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests_ThroughMember.cs (1)
47ParseOptions parseOptions = null)
src\Analyzers\CSharp\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.cs (1)
24private static readonly ParseOptions s_strictFeatureFlag = CSharpParseOptions.Default.WithFeatures([KeyValuePairUtil.Create("strict", "true")]);
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (2)
30private static readonly ParseOptions CSharp72ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_2); 31private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (3)
40private Task TestDiagnosticMissingAsync(string initialMarkup, ParseOptions? parseOptions = null) 44private Task TestDiagnosticMissingAsync(string initialMarkup, OptionsCollection? options, ParseOptions? parseOptions = null) 48private Task TestDiagnosticsAsync(string initialMarkup, OptionsCollection? options, ParseOptions? parseOptions, params DiagnosticDescription[] expectedDiagnostics)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.cs (5)
46private protected Task TestMissingInRegularAndScriptAsync(string initialMarkup, OptionsCollection options, ParseOptions parseOptions = null) 48private protected Task TestMissingInRegularAndScriptAsync(string initialMarkup, string optionName, ParseOptions parseOptions = null) 50protected Task TestInRegularAndScriptAsync(string initialMarkup, string expectedMarkup, string optionName, ParseOptions parseOptions = null) 54protected async Task TestInRegularAndScriptWithAllOptionsAsync(string initialMarkup, string expectedMarkup, ParseOptions parseOptions = null) 62protected async Task TestMissingInRegularAndScriptWithAllOptionsAsync(string initialMarkup, ParseOptions parseOptions = null)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (2)
34ParseOptions? parseOptions, 57private async Task TestLanguageVersionNotUpgradedAsync(string initialMarkup, ParseOptions parseOptions, int index = 0)
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (1)
25private readonly ParseOptions CSharp12 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12);
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests_Field.cs (2)
17private readonly ParseOptions CSharp13 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13); 18private readonly ParseOptions Preview = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview);
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (2)
22private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 23private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (3)
26private static readonly ParseOptions CSharp7 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7); 27private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 28private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
29private static readonly ParseOptions CSharp72ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_2);
UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzerTests.cs (3)
26private static readonly ParseOptions CSharp9 = TestOptions.RegularPreview.WithLanguageVersion(LanguageVersion.CSharp9); 36private Task TestAllMissingOnExpressionAsync(string expression, ParseOptions? parseOptions = null, bool enabled = true) 39private Task TestMissingAsync(string initialMarkup, ParseOptions? parseOptions = null, bool enabled = true)
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScriptCompiler.cs (1)
30public override SyntaxTree ParseSubmission(SourceText text, ParseOptions parseOptions, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
SourceGeneration\GeneratorDriverTests.cs (3)
802ParseOptions? passedOptions = null; 3928IncrementalValueProvider<ParseOptions> parseOptionsProvider = default; 3974IncrementalValueProvider<ParseOptions> parseOptionsProvider = default;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
1006public override SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (23)
Parsing\ExpressionParsingTests.cs (3)
25private ExpressionSyntax ParseExpression(string text, ParseOptions options = null) 594private void TestPostfixUnary(SyntaxKind kind, ParseOptions options = null) 666private void TestAssignment(SyntaxKind kind, ParseOptions options = null)
Parsing\LambdaAttributeParsingTests.cs (3)
3572void verify(string source, ParseOptions? parseOptions = null) 3602void verify(string source, ParseOptions? parseOptions = null) 3635void verify(string source, ParseOptions? parseOptions = null)
Parsing\LambdaReturnTypeParsingTests.cs (9)
170void verify(string source, ParseOptions? parseOptions = null) 5128void verify(string source, ParseOptions? parseOptions = null) 5160void verify(string source, ParseOptions? parseOptions = null) 5182void verify(string source, ParseOptions? parseOptions = null) 5238void verify(string source, ParseOptions? parseOptions = null) 5291void verify(string source, ParseOptions? parseOptions = null) 5342void verify(string source, ParseOptions? parseOptions = null) 5387void verify(string source, ParseOptions? parseOptions = null) 5435void verify(string source, ParseOptions? parseOptions = null)
Parsing\MemberDeclarationParsingTests.cs (1)
23private MemberDeclarationSyntax ParseDeclaration(string text, int offset = 0, ParseOptions options = null)
Parsing\ParsingTests.cs (4)
94internal void UsingStatement(string text, ParseOptions? options, params DiagnosticDescription[] expectedErrors) 101internal void UsingDeclaration(string text, ParseOptions? options, params DiagnosticDescription[] expectedErrors) 106internal void UsingDeclaration(string text, int offset = 0, ParseOptions? options = null, bool consumeFullText = true, params DiagnosticDescription[] expectedErrors) 121internal void UsingExpression(string text, ParseOptions? options, params DiagnosticDescription[] expectedErrors)
Parsing\StatementParsingTests.cs (2)
21private StatementSyntax ParseStatement(string text, int offset = 0, ParseOptions options = null) 151private void TestPostfixUnaryOperator(SyntaxKind kind, ParseOptions options = null)
Syntax\Mocks\MockCSharpSyntaxTree.cs (1)
58public override SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options)
Microsoft.CodeAnalysis.CSharp.Workspaces (27)
Serialization\CSharpOptionsSerializationService.cs (2)
36public override void WriteTo(ParseOptions options, ObjectWriter writer) 65public override ParseOptions ReadParseOptionsFrom(ObjectReader reader, CancellationToken cancellationToken)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (1)
40public void Initialize(ParseOptions parseOptions, SimplifierOptions options, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParseOptionsExtensions.cs (1)
9public static LanguageVersion LanguageVersion(this ParseOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (12)
48public bool SupportsIndexingInitializer(ParseOptions options) 51public bool SupportsThrowExpression(ParseOptions options) 54public bool SupportsLocalFunctionDeclaration(ParseOptions options) 57public bool SupportsRecord(ParseOptions options) 60public bool SupportsRecordStruct(ParseOptions options) 63public bool SupportsTargetTypedConditionalExpression(ParseOptions options) 66public bool SupportsConstantInterpolatedStrings(ParseOptions options) 69public bool SupportsTupleDeconstruction(ParseOptions options) 73public bool SupportsCollectionExpressionNaturalType(ParseOptions options) 76public bool SupportsImplicitImplementationOfNonPublicInterfaceMembers(ParseOptions options) 1487public bool SupportsNotPattern(ParseOptions options) 1491public bool SupportsIsNotTypeExpression(ParseOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
37public override CSharpCodeGenerationContextInfo GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
194public override bool SupportsPatterns(ParseOptions options)
Workspace\LanguageServices\CSharpCompilationFactoryService.cs (1)
56GeneratorDriver ICompilationFactoryService.CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, string? generatedFilesBaseDirectory)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.cs (7)
29public override ParseOptions GetDefaultParseOptions() 32public override ParseOptions GetDefaultParseOptionsWithLatestLanguageVersion() 35public override ParseOptions TryParsePdbParseOptions(IReadOnlyDictionary<string, string> metadata) 48public override bool OptionsDifferOnlyByPreprocessorDirectives(ParseOptions options1, ParseOptions options2) 58public override SyntaxTree CreateSyntaxTree(string filePath, ParseOptions options, SourceText text, Encoding encoding, SourceHashAlgorithm checksumAlgorithm, SyntaxNode root) 64public override SyntaxTree ParseSyntaxTree(string filePath, ParseOptions options, SourceText text, CancellationToken cancellationToken)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
76public override SyntaxTree WithRootAndOptions(SyntaxNode root, ParseOptions options)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (6)
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (2)
23string text, bool allowFailure, ParseOptions? options = null) 47private static void Test(string stringText, string expected, ParseOptions? options = null)
Formatting\CSharpFormattingTestBase.cs (4)
20protected override SyntaxNode ParseCompilation(string text, ParseOptions? parseOptions) 27ParseOptions? parseOptions = null) 37ParseOptions? parseOptions = null) 48ParseOptions? parseOptions = null)
Microsoft.CodeAnalysis.EditorFeatures (4)
Classification\Syntactic\SyntacticClassificationTaggerProvider.ClassifiedLineCache.cs (3)
64private ParseOptions? _parseOptions; 89ParseOptions? parseOptions, 113ParseOptions? parseOptions,
Interactive\InteractiveEvaluatorLanguageInfoProvider.cs (1)
14public abstract ParseOptions ParseOptions { get; }
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (45)
BraceHighlighting\AbstractBraceHighlightingTests.cs (2)
24string markup, ParseOptions options = null, bool swapAnglesWithBrackets = false) 60protected abstract EditorTestWorkspace CreateWorkspace(string markup, ParseOptions options);
BraceHighlighting\MultiCharacterBraceHighlightingTests.cs (1)
22protected override EditorTestWorkspace CreateWorkspace(string markup, ParseOptions options)
BraceMatching\AbstractBraceMatcherTests.cs (2)
21protected abstract EditorTestWorkspace CreateWorkspaceFromCode(string code, ParseOptions options); 23protected async Task TestAsync(string markup, string expectedCode, ParseOptions options = null)
Classification\AbstractClassifierTests.cs (15)
27protected abstract Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string text, ImmutableArray<TextSpan> spans, ParseOptions? parseOptions, TestHost testHost); 40ParseOptions? parseOptions, 75ParseOptions[] parseOptionsSet, 78foreach (var parseOptions in parseOptionsSet) 87ParseOptions[] parseOptionsSet, 104ParseOptions? parseOptions, 123ParseOptions[] parseOptionsSet, 145ParseOptions[] parseOptionsSet, 171ParseOptions[] parseOptionsSet, 185ParseOptions[] parseOptionsSet, 209ParseOptions[] parseOptionsSet, 227ParseOptions[] parseOptionsSet, 244ParseOptions[] parseOptionsSet, 266protected static ParseOptions[] ParseOptions(params ParseOptions[] options) => options;
ExtractInterface\ExtractInterfaceTestState.cs (1)
39ParseOptions parseOptions = null,
Formatting\AbstractNewDocumentFormattingServiceTests.cs (2)
21protected abstract EditorTestWorkspace CreateTestWorkspace(string testCode, ParseOptions? parseOptions); 23internal async Task TestAsync(string testCode, string expected, OptionsCollection? options = null, ParseOptions? parseOptions = null)
Formatting\CoreFormatterTestsBase.cs (2)
130private protected void AssertFormatWithView(string expectedWithMarker, string codeWithMarker, ParseOptions parseOptions, OptionsCollection options = null) 157private EditorTestWorkspace CreateWorkspace(string codeWithMarker, ParseOptions parseOptions = null)
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
22protected abstract ParseOptions DefaultParseOptions { get; }
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (4)
30protected abstract IEnumerable<ParseOptions> GetOptions(); 31protected abstract EditorTestWorkspace CreateWorkspaceFromFile(string code, ParseOptions options); 35foreach (var option in GetOptions()) 41private async Task TestAsync(string markup, ParseOptions options)
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
92var parseOptions = CreateExperimentalParseOptions(); 116protected abstract ParseOptions CreateExperimentalParseOptions();
Workspaces\EditorTestHostProject.cs (3)
17ParseOptions? parseOptions, 52ParseOptions? parseOptions = null, 83ParseOptions? parseOptions = null,
Workspaces\EditorTestWorkspace.cs (1)
79ParseOptions? parseOptions,
Workspaces\EditorTestWorkspace_Create.cs (9)
46ParseOptions parseOptions, 60ParseOptions parseOptions, 71ParseOptions parseOptions, 80ParseOptions parseOptions, 99ParseOptions parseOptions, 117ParseOptions parseOptions = null, 130ParseOptions parseOptions = null, 146ParseOptions parseOptions = null, 158ParseOptions parseOptions = null,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (1)
990private static TestWorkspace CreateWorkspaceFromFile(string file, bool isVisualBasic, ParseOptions parseOptions, CompilationOptions compilationOptions)
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (1)
95protected override ParseOptions GetScriptOptions()
Microsoft.CodeAnalysis.Features (14)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
30public abstract Analyzer CreateAnalyzer(ISyntaxFacts syntaxFacts, ParseOptions options);
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
51protected abstract bool TryCreateUsingLocalDeclaration(ParseOptions options, TLocalDeclarationSyntax declarationStatement, [NotNullWhen(true)] out TLocalDeclarationSyntax? usingDeclarationStatement);
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
26private readonly ParseOptions? _parseOptions;
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
321var parseOptions = languageServices.GetRequiredService<ISyntaxTreeFactoryService>().TryParsePdbParseOptions(pdbCompilationOptions);
ReplaceMethodWithProperty\IReplaceMethodWithPropertyService.cs (1)
24CodeGenerationOptions options, ParseOptions parseOptions,
SemanticSearch\SemanticSearchProjectConfiguration.cs (1)
13public required ParseOptions ParseOptions { get; init; }
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
65protected abstract bool IsSupported(TSyntaxKind assignmentKind, ParseOptions options);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
32protected abstract bool AllowDelegateAndEnumConstraints(ParseOptions options);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (4)
108ParseOptions options, 181ParseOptions options, 229ParseOptions options, ISymbol member, string memberName, bool supportsImplementingLessAccessibleMember) 257private bool HasUnexpressibleConstraint(ParseOptions options, ISymbol member)
src\Analyzers\Core\CodeFixes\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (1)
27protected abstract string GetTitle(bool negated, ParseOptions options);
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
183protected abstract bool SupportsNonTrailingNamedArguments(ParseOptions options);
Microsoft.CodeAnalysis.Rebuild (4)
CompilationFactory.cs (2)
23public ParseOptions ParseOptions => CommonParseOptions; 26protected abstract ParseOptions CommonParseOptions { get; }
CSharpCompilationFactory.cs (1)
22protected override ParseOptions CommonParseOptions => ParseOptions;
VisualBasicCompilationFactory.cs (1)
25protected override ParseOptions CommonParseOptions => ParseOptions;
Microsoft.CodeAnalysis.Rebuild.UnitTests (10)
BasicDeterministicKeyBuilderTests.cs (1)
58verifyCount<ParseOptions>(11);
CSharpDeterministicKeyBuilderTests.cs (1)
57verifyCount<ParseOptions>(11);
DeterministicKeyBuilderTests.cs (4)
31where TParseOptions : ParseOptions 181protected JObject GetParseOptionsValue(ParseOptions parseOptions) 420var parseOptions = GetParseOptions() 469var parseOptions = GetParseOptions()
RoundTripUtil.cs (4)
241VerifyParseOptions((ParseOptions)originalValue, (ParseOptions)rebuildValue); 256private static void VerifyParseOptions(ParseOptions originalOptions, ParseOptions rebuildOptions)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\AssetProvider.cs (1)
196tasks.Add(SynchronizeProjectAssetAsync<ParseOptions>(new(AssetPathKind.ProjectParseOptions, projectId), static p => p.ParseOptions));
Host\RemoteWorkspace.SolutionCreator.cs (1)
358project = project.WithParseOptions(await _assetProvider.GetAssetAsync<ParseOptions>(
Microsoft.CodeAnalysis.Remote.Workspaces (1)
AbstractAssetProvider.cs (1)
88var parseOptionsTask = GetAssetAsync<ParseOptions>(new(AssetPathKind.ProjectParseOptions, projectId), projectChecksums.ParseOptions, cancellationToken);
Microsoft.CodeAnalysis.Scripting (4)
ScriptCompiler.cs (1)
20public abstract SyntaxTree ParseSubmission(SourceText text, ParseOptions parseOptions, CancellationToken cancellationToken);
ScriptOptions.cs (3)
141internal ParseOptions? ParseOptions { get; private set; } 157ParseOptions? parseOptions, 391internal ScriptOptions WithParseOptions(ParseOptions parseOptions)
Microsoft.CodeAnalysis.Test.Utilities (1)
Syntax\TokenUtilities.cs (1)
96internal static SyntaxNode GetSyntaxRoot(string expectedText, string language, ParseOptions options = null)
Microsoft.CodeAnalysis.UnitTests (3)
CommonParseOptionsTests.cs (3)
15/// If this test fails, please update the <see cref="ParseOptions.GetHashCodeHelper"/> 16/// and <see cref="ParseOptions.EqualsHelper"/> methods to 24typeof(ParseOptions),
Microsoft.CodeAnalysis.VisualBasic (17)
CommandLine\VisualBasicCommandLineArguments.vb (1)
43Protected Overrides ReadOnly Property ParseOptionsCore As ParseOptions
CommandLine\VisualBasicCompiler.vb (1)
300Private Protected Overrides Function CreateGeneratorDriver(baseDirectory As String, parseOptions As ParseOptions, generators As ImmutableArray(Of ISourceGenerator), analyzerConfigOptionsProvider As AnalyzerConfigOptionsProvider, additionalTexts As ImmutableArray(Of AdditionalText)) As GeneratorDriver
Compilation\VisualBasicCompilation.vb (1)
2171Dim parseOptionsReported = New HashSet(Of ParseOptions)
Compilation\VisualBasicDeterministicKeyBuilder.vb (1)
18Protected Overrides Sub WriteParseOptionsCore(writer As JsonWriter, parseOptions As ParseOptions)
Syntax\SyntaxNodeFactories.vb (6)
33Optional options As ParseOptions = Nothing, 45options As ParseOptions, 58options As ParseOptions, 73Optional options As ParseOptions = Nothing, 87Optional options As ParseOptions = Nothing, 198Public Shared Function ParseTypeName(text As String, Optional offset As Integer = 0, Optional options As ParseOptions = Nothing, Optional consumeFullText As Boolean = True) As TypeSyntax
Syntax\VisualBasicSyntaxTree.DummySyntaxTree.vb (1)
90Public Overrides Function WithRootAndOptions(root As SyntaxNode, options As ParseOptions) As SyntaxTree
Syntax\VisualBasicSyntaxTree.LazySyntaxTree.vb (1)
114Public Overrides Function WithRootAndOptions(root As SyntaxNode, options As ParseOptions) As SyntaxTree
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
139Public Overrides Function WithRootAndOptions(root As SyntaxNode, options As ParseOptions) As SyntaxTree
Syntax\VisualBasicSyntaxTree.vb (1)
561Protected Overrides ReadOnly Property OptionsCore As ParseOptions
VisualBasicParseOptions.vb (3)
210Public Overrides Function CommonWithKind(kind As SourceCodeKind) As ParseOptions 219Protected Overrides Function CommonWithDocumentationMode(documentationMode As DocumentationMode) As ParseOptions 223Protected Overrides Function CommonWithFeatures(features As IEnumerable(Of KeyValuePair(Of String, String))) As ParseOptions
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (13)
src\Analyzers\VisualBasic\Analyzers\UseCompoundAssignment\VisualBasicUseCompoundAssignmentDiagnosticAnalyzer.vb (1)
23Protected Overrides Function IsSupported(assignmentKind As SyntaxKind, options As ParseOptions) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (12)
46Public Function SupportsIndexingInitializer(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsIndexingInitializer 50Public Function SupportsThrowExpression(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsThrowExpression 54Public Function SupportsLocalFunctionDeclaration(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsLocalFunctionDeclaration 58Public Function SupportsRecord(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsRecord 62Public Function SupportsRecordStruct(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsRecordStruct 66Public Function SupportsTargetTypedConditionalExpression(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsTargetTypedConditionalExpression 70Public Function SupportsConstantInterpolatedStrings(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsConstantInterpolatedStrings 74Public Function SupportsTupleDeconstruction(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsTupleDeconstruction 79Public Function SupportsCollectionExpressionNaturalType(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsCollectionExpressionNaturalType 83Public Function SupportsImplicitImplementationOfNonPublicInterfaceMembers(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsImplicitImplementationOfNonPublicInterfaceMembers 1694Public Function SupportsNotPattern(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsNotPattern 1698Public Function SupportsIsNotTypeExpression(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsIsNotTypeExpression
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
38Protected Overrides Function AllowDelegateAndEnumConstraints(options As ParseOptions) As Boolean
src\Analyzers\VisualBasic\CodeFixes\UseIsNullCheck\VisualBasicUseIsNullCheckForReferenceEqualsCodeFixProvider.vb (1)
21Protected Overrides Function GetTitle(negate As Boolean, options As ParseOptions) As String
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (1)
37Public Overrides Function GetInfo(context As CodeGenerationContext, options As CodeGenerationOptions, parseOptions As ParseOptions) As VisualBasicCodeGenerationContextInfo
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
461Public Overrides Function SupportsPatterns(options As ParseOptions) As Boolean
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (2)
src\Analyzers\VisualBasic\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.vb (1)
15Private Shared ReadOnly s_strictFeatureFlag As ParseOptions = VisualBasicParseOptions.Default.WithFeatures({New KeyValuePair(Of String, String)("strict", "true")})
src\Features\VisualBasicTest\Diagnostics\AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest_NoEditor.vb (1)
22Protected Overrides Function GetScriptOptions() As ParseOptions
Microsoft.CodeAnalysis.VisualBasic.Features (7)
ConvertIfToSwitch\VisualBasicConvertIfToSwitchCodeRefactoringProvider.vb (1)
27Public Overrides Function CreateAnalyzer(syntaxFacts As ISyntaxFacts, options As ParseOptions) As Analyzer
IntroduceUsingStatement\VisualBasicIntroduceUsingStatementCodeRefactoringProvider.vb (1)
77Protected Overrides Function TryCreateUsingLocalDeclaration(options As ParseOptions, declarationStatement As LocalDeclarationStatementSyntax, ByRef usingDeclarationStatement As LocalDeclarationStatementSyntax) As Boolean
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
39parseOptions As ParseOptions,
src\Analyzers\VisualBasic\Analyzers\UseCompoundAssignment\VisualBasicUseCompoundAssignmentDiagnosticAnalyzer.vb (1)
23Protected Overrides Function IsSupported(assignmentKind As SyntaxKind, options As ParseOptions) As Boolean
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
38Protected Overrides Function AllowDelegateAndEnumConstraints(options As ParseOptions) As Boolean
src\Analyzers\VisualBasic\CodeFixes\UseIsNullCheck\VisualBasicUseIsNullCheckForReferenceEqualsCodeFixProvider.vb (1)
21Protected Overrides Function GetTitle(negate As Boolean, options As ParseOptions) As String
UseNamedArguments\VisualBasicUseNamedArgumentsCodeRefactoringProvider.vb (1)
49Protected Overrides Function SupportsNonTrailingNamedArguments(options As ParseOptions) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (10)
CodeActions\AbstractVisualBasicCodeActionTest_NoEditor.vb (2)
17Protected Overrides Function GetScriptOptions() As ParseOptions 29Protected Overloads Async Function TestAsync(initialMarkup As XElement, expected As XElement, Optional index As Integer = 0, Optional parseOptions As ParseOptions = Nothing) As Threading.Tasks.Task
Diagnostics\AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest_NoEditor.vb (1)
22Protected Overrides Function GetScriptOptions() As ParseOptions
Diagnostics\Configuration\ConfigureCodeStyle\BooleanCodeStyleOptionConfigurationTests.vb (1)
24Protected Overrides Function GetScriptOptions() As ParseOptions
Diagnostics\Configuration\ConfigureSeverity\CodeStyleOptionBasedSeverityConfigurationTests.vb (1)
24Protected Overrides Function GetScriptOptions() As ParseOptions
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
48Protected Overrides Function GetScriptOptions() As ParseOptions
Diagnostics\Configuration\ConfigureSeverity\MultipleCodeStyleOptionBasedConfigureSeverityTests.vb (1)
23Protected Overrides Function GetScriptOptions() As ParseOptions
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.vb (1)
28Protected Overrides Function GetScriptOptions() As ParseOptions
Diagnostics\Suppression\SuppressionAllCodeTests.vb (1)
22Protected Overrides Function CreateWorkspaceFromFile(definition As String, parseOptions As ParseOptions) As TestWorkspace
Diagnostics\Suppression\SuppressionTests.vb (1)
19Protected Overrides Function GetScriptOptions() As ParseOptions
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
VisualBasicScriptCompiler.vb (1)
40Public Overrides Function ParseSubmission(text As SourceText, parseOptions As ParseOptions, cancellationToken As CancellationToken) As SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Parser\VisualBasicParseOptionsTests.vb (2)
226''' If this test fails, please update the <see cref="ParseOptions.GetHashCode" /> 227''' And <see cref="ParseOptions.Equals" /> methods to
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
ParserTestUtilities.vb (1)
549Public Overrides Function WithRootAndOptions(root As SyntaxNode, options As ParseOptions) As SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.Workspaces (26)
Serialization\VisualBasicOptionsSerializationService.vb (2)
42Public Overrides Sub WriteTo(options As ParseOptions, writer As ObjectWriter) 105Public Overrides Function ReadParseOptionsFrom(reader As ObjectReader, cancellationToken As CancellationToken) As ParseOptions
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (1)
33Public Sub Initialize(parseOptions As ParseOptions, options As SimplifierOptions, cancellationToken As CancellationToken) Implements IReductionRewriter.Initialize
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (12)
46Public Function SupportsIndexingInitializer(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsIndexingInitializer 50Public Function SupportsThrowExpression(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsThrowExpression 54Public Function SupportsLocalFunctionDeclaration(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsLocalFunctionDeclaration 58Public Function SupportsRecord(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsRecord 62Public Function SupportsRecordStruct(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsRecordStruct 66Public Function SupportsTargetTypedConditionalExpression(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsTargetTypedConditionalExpression 70Public Function SupportsConstantInterpolatedStrings(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsConstantInterpolatedStrings 74Public Function SupportsTupleDeconstruction(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsTupleDeconstruction 79Public Function SupportsCollectionExpressionNaturalType(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsCollectionExpressionNaturalType 83Public Function SupportsImplicitImplementationOfNonPublicInterfaceMembers(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsImplicitImplementationOfNonPublicInterfaceMembers 1694Public Function SupportsNotPattern(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsNotPattern 1698Public Function SupportsIsNotTypeExpression(options As ParseOptions) As Boolean Implements ISyntaxFacts.SupportsIsNotTypeExpression
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (1)
37Public Overrides Function GetInfo(context As CodeGenerationContext, options As CodeGenerationOptions, parseOptions As ParseOptions) As VisualBasicCodeGenerationContextInfo
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
461Public Overrides Function SupportsPatterns(options As ParseOptions) As Boolean
Workspace\LanguageServices\VisualBasicCompilationFactoryService.vb (1)
64parseOptions As ParseOptions,
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.ParsedSyntaxTree.vb (1)
76Public Overrides Function WithRootAndOptions(root As SyntaxNode, options As ParseOptions) As SyntaxTree
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.vb (7)
25Public Overloads Overrides Function GetDefaultParseOptions() As ParseOptions 29Public Overrides Function TryParsePdbParseOptions(metadata As IReadOnlyDictionary(Of String, String)) As ParseOptions 52Public Overrides Function OptionsDifferOnlyByPreprocessorDirectives(options1 As ParseOptions, options2 As ParseOptions) As Boolean 61Public Overloads Overrides Function GetDefaultParseOptionsWithLatestLanguageVersion() As ParseOptions 65Public Overrides Function ParseSyntaxTree(filePath As String, options As ParseOptions, text As SourceText, cancellationToken As CancellationToken) As SyntaxTree 73Public Overrides Function CreateSyntaxTree(filePath As String, options As ParseOptions, text As SourceText, encoding As Encoding, checksumAlgorithm As SourceHashAlgorithm, root As SyntaxNode) As SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Formatting\VisualBasicFormattingTestBase.vb (1)
32Protected Overrides Function ParseCompilation(text As String, parseOptions As ParseOptions) As SyntaxNode
Microsoft.CodeAnalysis.Workspaces (106)
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (2)
29/// Cache of ParseOptions to a checksum for the <see cref="ParseOptions.PreprocessorSymbolNames"/> contained 33private static readonly ConditionalWeakTable<ParseOptions, StrongBox<Checksum>> s_ppDirectivesToChecksum = new();
Remote\ISerializerService.cs (1)
17Checksum CreateParseOptionsChecksum(ParseOptions value);
Serialization\AbstractOptionsSerializationService.cs (3)
19public abstract void WriteTo(ParseOptions options, ObjectWriter writer); 22public abstract ParseOptions ReadParseOptionsFrom(ObjectReader reader, CancellationToken cancellationToken); 191protected static void WriteParseOptionsTo(ParseOptions options, ObjectWriter writer)
Serialization\IOptionsSerializationService.cs (2)
19void WriteTo(ParseOptions options, ObjectWriter writer); 22ParseOptions ReadParseOptionsFrom(ObjectReader reader, CancellationToken cancellationToken);
Serialization\SerializationExtensions.cs (1)
25ParseOptions => WellKnownSynchronizationKind.ParseOptions,
Serialization\SerializerService_Asset.cs (2)
46public void SerializeParseOptions(ParseOptions options, ObjectWriter writer) 57private ParseOptions DeserializeParseOptions(ObjectReader reader, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFacts.cs (12)
94bool SupportsIndexingInitializer(ParseOptions options); 95bool SupportsLocalFunctionDeclaration(ParseOptions options); 96bool SupportsNotPattern(ParseOptions options); 97bool SupportsRecord(ParseOptions options); 98bool SupportsRecordStruct(ParseOptions options); 99bool SupportsThrowExpression(ParseOptions options); 100bool SupportsTargetTypedConditionalExpression(ParseOptions options); 101bool SupportsIsNotTypeExpression(ParseOptions options); 102bool SupportsConstantInterpolatedStrings(ParseOptions options); 103bool SupportsTupleDeconstruction(ParseOptions options); 104bool SupportsCollectionExpressionNaturalType(ParseOptions options); 105bool SupportsImplicitImplementationOfNonPublicInterfaceMembers(ParseOptions options);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
41public abstract TCodeGenerationContextInfo GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions); 43CodeGenerationContextInfo ICodeGenerationService.GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (1)
18CodeGenerationContextInfo GetInfo(CodeGenerationContext context, CodeGenerationOptions options, ParseOptions parseOptions);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (4)
36ParseOptions parseOptions, 113ParseOptions parseOptions, 275ParseOptions parseOptions, 323SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, ParseOptions parseOptions, SyntaxNode otherNameExpression, ArrayBuilder<SyntaxNode> expressions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
65var options = semanticModel.SyntaxTree.Options;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxGeneratorInternalExtensions\SyntaxGeneratorInternal.cs (1)
111public abstract bool SupportsPatterns(ParseOptions options);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractReducer.IExpressionRewriter.cs (1)
16void Initialize(ParseOptions parseOptions, SimplifierOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (2)
12public static bool CanApplyParseOptionChange(this Project project, ParseOptions oldOptions, ParseOptions newOptions)
Workspace\Host\CompilationFactory\ICompilationFactoryService.cs (1)
18GeneratorDriver CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, string? generatedFilesBaseDirectory);
Workspace\Host\ISupportedChangesService.cs (4)
24bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project); 47public bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project)
Workspace\Host\SyntaxTreeFactory\AbstractSyntaxTreeFactoryService.cs (7)
16public abstract ParseOptions GetDefaultParseOptions(); 17public abstract ParseOptions GetDefaultParseOptionsWithLatestLanguageVersion(); 18public abstract bool OptionsDifferOnlyByPreprocessorDirectives(ParseOptions options1, ParseOptions options2); 19public abstract ParseOptions TryParsePdbParseOptions(IReadOnlyDictionary<string, string> metadata); 20public abstract SyntaxTree CreateSyntaxTree(string filePath, ParseOptions options, SourceText text, Encoding encoding, SourceHashAlgorithm checksumAlgorithm, SyntaxNode root); 21public abstract SyntaxTree ParseSyntaxTree(string filePath, ParseOptions options, SourceText text, CancellationToken cancellationToken);
Workspace\Host\SyntaxTreeFactory\ISyntaxTreeFactoryService.cs (7)
17ParseOptions GetDefaultParseOptions(); 19ParseOptions GetDefaultParseOptionsWithLatestLanguageVersion(); 21ParseOptions TryParsePdbParseOptions(IReadOnlyDictionary<string, string> compilationOptionsMetadata); 27bool OptionsDifferOnlyByPreprocessorDirectives(ParseOptions options1, ParseOptions options2); 30SyntaxTree CreateSyntaxTree(string? filePath, ParseOptions options, SourceText? text, Encoding? encoding, SourceHashAlgorithm checksumAlgorithm, SyntaxNode root); 33SyntaxTree ParseSyntaxTree(string? filePath, ParseOptions options, SourceText text, CancellationToken cancellationToken);
Workspace\ProjectSystem\ProjectSystemProject.cs (3)
82private ParseOptions? _parseOptions; 167ParseOptions? parseOptions) 368public ParseOptions? ParseOptions
Workspace\ProjectSystem\ProjectSystemProjectCreationInfo.cs (1)
14public ParseOptions? ParseOptions { get; set; }
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (5)
206var parseOptions = _commandLineArgumentsForCommandLine.ParseOptions 276/// Override by derived classes to provide a hook to modify a <see cref="ParseOptions"/> with any host-provided values that didn't come from 279protected virtual ParseOptions ComputeParseOptionsWithHostValues(ParseOptions parseOptions) 284/// by either <see cref="ComputeCompilationOptionsWithHostValues(CompilationOptions, IRuleSetFile)"/> or <see cref="ComputeParseOptionsWithHostValues(ParseOptions)"/>.
Workspace\Solution\DocumentState.cs (9)
32public ParseOptions? ParseOptions { get; } 45ParseOptions? options, 59ParseOptions? options, 119ParseOptions options, 133ParseOptions options, 149ParseOptions options, 163ParseOptions options, 339public DocumentState UpdateParseOptionsAndSourceCodeKind(ParseOptions options, bool onlyPreprocessorDirectiveChange) 523ParseOptions options,
Workspace\Solution\DocumentState_LinkedFileReuse.cs (5)
105ParseOptions parseOptions, 131ParseOptions parseOptions, 193var siblingParseOptions = siblingTree.Options; 237ParseOptions parseOptions, 260ParseOptions parseOptions,
Workspace\Solution\Project.cs (2)
165public ParseOptions? ParseOptions => State.ParseOptions; 605public Project WithParseOptions(ParseOptions options)
Workspace\Solution\ProjectChanges.cs (1)
124/// otherwise get documents with any changes i.e. <see cref="ParseOptions"/>, <see cref="SourceCodeKind"/> and file path.
Workspace\Solution\ProjectInfo.cs (8)
119public ParseOptions? ParseOptions { get; } 159ParseOptions? parseOptions, 193ParseOptions? parseOptions, 221ParseOptions? parseOptions = null, 262ParseOptions? parseOptions = null, 287Optional<ParseOptions?> parseOptions = default, 298var newParseOptions = parseOptions.HasValue ? parseOptions.Value : ParseOptions; 373public ProjectInfo WithParseOptions(ParseOptions? parseOptions)
Workspace\Solution\ProjectState.cs (4)
114var parseOptions = projectInfoFixed.ParseOptions; 304internal DocumentState CreateDocument(DocumentInfo documentInfo, ParseOptions? parseOptions, LoadTextOptions loadTextOptions) 686public ParseOptions? ParseOptions => this.ProjectInfo.ParseOptions; 803public ProjectState WithParseOptions(ParseOptions? options)
Workspace\Solution\Solution.cs (1)
494public Solution WithProjectParseOptions(ProjectId projectId, ParseOptions options)
Workspace\Solution\SolutionCompilationState.cs (1)
498ProjectId projectId, ParseOptions? options)
Workspace\Solution\SolutionState.cs (1)
655public StateChange WithProjectParseOptions(ProjectId projectId, ParseOptions? options)
Workspace\Solution\SourceGeneratedDocumentState.cs (5)
47ParseOptions parseOptions, 64ParseOptions parseOptions, 105ParseOptions options, 125public new ParseOptions ParseOptions => base.ParseOptions!; 156public SourceGeneratedDocumentState WithParseOptions(ParseOptions parseOptions)
Workspace\Workspace.cs (6)
911protected internal void OnParseOptionsChanged(ProjectId projectId, ParseOptions options) 1849/// <param name="oldOptions">The old <see cref="ParseOptions"/> of the project from prior to the change.</param> 1850/// <param name="newOptions">The new <see cref="ParseOptions"/> of the project that was passed to <see cref="TryApplyChanges(Solution)"/>.</param> 1852public virtual bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project) 2103protected virtual void ApplyParseOptionsChanged(ProjectId projectId, ParseOptions options)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
343var parseOptions = commandLineArgs.ParseOptions;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
1656var options = project.ParseOptions; 1944var options = project.ParseOptions; 1967var options = project.ParseOptions;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (50)
Formatting\FormattingTestBase.cs (3)
40ParseOptions? parseOptions = null) 64protected abstract SyntaxNode ParseCompilation(string text, ParseOptions? parseOptions); 67SolutionServices services, string expected, SyntaxNode root, IEnumerable<TextSpan> spans, SyntaxFormattingOptions options, bool treeCompare = true, ParseOptions? parseOptions = null)
Workspaces\TestHostProject.cs (5)
19ParseOptions parseOptions, 28ParseOptions parseOptions, 47ParseOptions parseOptions = null, 60ParseOptions parseOptions, 94ParseOptions parseOptions = null,
Workspaces\TestHostProject`1.cs (3)
55public ParseOptions ParseOptions { get; } 92ParseOptions parseOptions, 129ParseOptions parseOptions = null,
Workspaces\TestHostSolution.cs (1)
17ParseOptions parseOptions,
Workspaces\TestWorkspace.cs (1)
64ParseOptions? parseOptions,
Workspaces\TestWorkspace_Create.cs (9)
46ParseOptions parseOptions, 60ParseOptions parseOptions, 71ParseOptions parseOptions, 80ParseOptions parseOptions, 99ParseOptions parseOptions, 117ParseOptions parseOptions = null, 130ParseOptions parseOptions = null, 146ParseOptions parseOptions = null, 158ParseOptions parseOptions = null,
Workspaces\TestWorkspace_XmlConsumption.cs (13)
154var parseOptions = GetParseOptions(projectElement, language, languageServices); 233private static ParseOptions GetParseOptions(XElement projectElement, string language, HostLanguageServices languageServices) 240private static ParseOptions GetParseOptionsWorker(XElement projectElement, string language, HostLanguageServices languageServices) 242ParseOptions parseOptions; 274private static ParseOptions GetPreProcessorParseOptions(string language, XAttribute preprocessorSymbolsAttribute) 291private static ParseOptions GetParseOptionsWithFeatures(ParseOptions parseOptions, XAttribute featuresAttribute) 307private static ParseOptions GetParseOptionsWithLanguageVersion(string language, ParseOptions parseOptions, XAttribute languageVersionAttribute) 398ParseOptions parseOptions) 406private CompilationOptions CreateCompilationOptions(string language, XElement compilationOptionsElement, ParseOptions parseOptions) 773var parseOptions = GetParseOptions(referencedSource, languageName, languageServices); 788private static SyntaxTree CreateSyntaxTree(ParseOptions options, string referencedCode)
Workspaces\TestWorkspace_XmlCreation.cs (8)
22ParseOptions parseOptions = null, 87ParseOptions parseOptions, 102private static XAttribute CreateLanguageVersionAttribute(ParseOptions parseOptions) 120private static XAttribute CreateFeaturesAttribute(ParseOptions parseOptions) 131private static XAttribute CreateDocumentationModeAttribute(ParseOptions parseOptions) 190string code, string filePath, string folders = null, ParseOptions parseOptions = null, bool isMarkup = true) 207protected static XElement CreateDocumentFromSourceGeneratorElement(string code, string hintName, ParseOptions parseOptions = null) 216private static XElement CreateParseOptionsElement(ParseOptions parseOptions)
Workspaces\TestWorkspace`1.cs (7)
204ParseOptions? parseOptions, 222public static string GetSourceFileExtension(string language, ParseOptions parseOptions) 288public new void OnParseOptionsChanged(ProjectId projectId, ParseOptions parseOptions) 592public override bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project) 607ParseOptions? parseOptions = null, 778var parseOptions = syntaxFactory.GetDefaultParseOptions().WithKind(SourceCodeKind.Script);
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
BatchFixAllProviderTests.cs (1)
154protected override ParseOptions CreateParseOptions()
Host\LanguageServices\TestCSharpCompilationFactoryServiceWithIncrementalGeneratorTracking.cs (1)
58GeneratorDriver ICompilationFactoryService.CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, string? generatedFilesBaseDirectory)
SolutionTests\SolutionTests.cs (7)
68string docContents, ParseOptions? parseOptions1 = null, ParseOptions? parseOptions2 = null) 1772(ParseOptions)options, 1835ParseOptions newOptions = languageName == LanguageNames.CSharp 3045var oldParseOptions = solution.GetProject(project1).ParseOptions; 3048var newUpdatedParseOptions = solution.GetProject(project1).ParseOptions; 3817var newOptions = tree.Options.WithKind(SourceCodeKind.Script);
SolutionTests\TryApplyChangesTests.cs (6)
21private readonly Func<ParseOptions, ParseOptions, bool>? _canApplyParseOptions; 30Func<ParseOptions, ParseOptions, bool>? canApplyParseOptions = null, 47public override bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project)
WorkspaceTests\AdhocWorkspaceTests.cs (1)
406public void SetParseOptions(ProjectId id, ParseOptions options)
Microsoft.VisualStudio.LanguageServices (6)
ProjectSystem\VisualStudioWorkspaceImpl.cs (3)
398public override bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, CodeAnalysis.Project project) 500protected override void ApplyParseOptionsChanged(ProjectId projectId, ParseOptions options)
Utilities\IParseOptionsChangingService.cs (3)
12bool CanApplyChange(ParseOptions oldOptions, ParseOptions newOptions, string? maxSupportedLangVersion); 14void Apply(ParseOptions options, ProjectPropertyStorage storage);
Microsoft.VisualStudio.LanguageServices.CSharp (5)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (2)
215protected override ParseOptions ComputeParseOptionsWithHostValues(ParseOptions parseOptions)
Utilities\CSharpParseOptionsChangingService.cs (3)
25public bool CanApplyChange(ParseOptions oldOptions, ParseOptions newOptions, string? maxLangVersion) 56public void Apply(ParseOptions options, ProjectPropertyStorage storage)
Microsoft.VisualStudio.LanguageServices.VisualBasic (5)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (2)
202Protected Overrides Function ComputeParseOptionsWithHostValues(parseOptions As ParseOptions) As ParseOptions
Utilities\VisualBasicParseOptionsChangingService.vb (3)
20Public Function CanApplyChange(oldOptions As ParseOptions, newOptions As ParseOptions, maxLangVersion As String) As Boolean Implements IParseOptionsChangingService.CanApplyChange 24Public Sub Apply(options As ParseOptions, storage As ProjectPropertyStorage) Implements IParseOptionsChangingService.Apply
Roslyn.VisualStudio.Next.UnitTests (2)
Remote\SerializationValidator.cs (1)
147await VerifyAssetSerializationAsync<ParseOptions>(
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
248private static TestWorkspace CreateWorkspace(string language, string code, ParseOptions options = null)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Analyzers\Verifiers\CSharpIncrementalSourceGeneratorVerifier.cs (1)
36protected override ParseOptions CreateParseOptions()