src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (2)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (9)
33ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty);
36private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions;
38private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
69var perTreeOptionsBuilder = PooledDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.GetInstance();
70foreach (var tree in compilation.SyntaxTrees)
77static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider)
84public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
102public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
112private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (30)
31private static bool TryGetSyntaxTreeForOption(ISymbol symbol, [NotNullWhen(returnValue: true)] out SyntaxTree? tree)
53=> TryGetSyntaxTreeForOption(symbol, out var tree)
60SyntaxTree tree,
71=> TryGetSyntaxTreeForOption(symbol, out var tree)
78SyntaxTree tree,
89=> TryGetSyntaxTreeForOption(symbol, out var tree)
96SyntaxTree tree,
104SyntaxTree tree,
111SyntaxTree tree,
122=> TryGetSyntaxTreeForOption(symbol, out var tree)
129SyntaxTree tree,
138SyntaxTree tree,
154SyntaxTree tree,
181SyntaxTree tree,
194=> TryGetSyntaxTreeForOption(symbol, out var tree)
202SyntaxTree tree,
214SyntaxTree tree,
226SyntaxTree tree,
242SyntaxTree tree,
249SyntaxTree tree,
302=> TryGetSyntaxTreeForOption(symbol, out var tree)
311=> TryGetSyntaxTreeForOption(symbol, out var tree)
326SyntaxTree? tree,
340SyntaxTree? tree,
389SyntaxTree? tree,
428SyntaxTree tree,
436SyntaxTree tree,
443SyntaxTree tree,
450SyntaxTree tree,
458SyntaxTree? tree,
src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)
src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (2)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (9)
33ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty);
36private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions;
38private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
69var perTreeOptionsBuilder = PooledDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.GetInstance();
70foreach (var tree in compilation.SyntaxTrees)
77static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider)
84public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
102public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
112private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (30)
31private static bool TryGetSyntaxTreeForOption(ISymbol symbol, [NotNullWhen(returnValue: true)] out SyntaxTree? tree)
53=> TryGetSyntaxTreeForOption(symbol, out var tree)
60SyntaxTree tree,
71=> TryGetSyntaxTreeForOption(symbol, out var tree)
78SyntaxTree tree,
89=> TryGetSyntaxTreeForOption(symbol, out var tree)
96SyntaxTree tree,
104SyntaxTree tree,
111SyntaxTree tree,
122=> TryGetSyntaxTreeForOption(symbol, out var tree)
129SyntaxTree tree,
138SyntaxTree tree,
154SyntaxTree tree,
181SyntaxTree tree,
194=> TryGetSyntaxTreeForOption(symbol, out var tree)
202SyntaxTree tree,
214SyntaxTree tree,
226SyntaxTree tree,
242SyntaxTree tree,
249SyntaxTree tree,
302=> TryGetSyntaxTreeForOption(symbol, out var tree)
311=> TryGetSyntaxTreeForOption(symbol, out var tree)
326SyntaxTree? tree,
340SyntaxTree? tree,
389SyntaxTree? tree,
428SyntaxTree tree,
436SyntaxTree tree,
443SyntaxTree tree,
450SyntaxTree tree,
458SyntaxTree? tree,
src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)
src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (2)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (9)
33ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty);
36private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions;
38private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
69var perTreeOptionsBuilder = PooledDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.GetInstance();
70foreach (var tree in compilation.SyntaxTrees)
77static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider)
84public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
102public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
112private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (30)
31private static bool TryGetSyntaxTreeForOption(ISymbol symbol, [NotNullWhen(returnValue: true)] out SyntaxTree? tree)
53=> TryGetSyntaxTreeForOption(symbol, out var tree)
60SyntaxTree tree,
71=> TryGetSyntaxTreeForOption(symbol, out var tree)
78SyntaxTree tree,
89=> TryGetSyntaxTreeForOption(symbol, out var tree)
96SyntaxTree tree,
104SyntaxTree tree,
111SyntaxTree tree,
122=> TryGetSyntaxTreeForOption(symbol, out var tree)
129SyntaxTree tree,
138SyntaxTree tree,
154SyntaxTree tree,
181SyntaxTree tree,
194=> TryGetSyntaxTreeForOption(symbol, out var tree)
202SyntaxTree tree,
214SyntaxTree tree,
226SyntaxTree tree,
242SyntaxTree tree,
249SyntaxTree tree,
302=> TryGetSyntaxTreeForOption(symbol, out var tree)
311=> TryGetSyntaxTreeForOption(symbol, out var tree)
326SyntaxTree? tree,
340SyntaxTree? tree,
389SyntaxTree? tree,
428SyntaxTree tree,
436SyntaxTree tree,
443SyntaxTree tree,
450SyntaxTree tree,
458SyntaxTree? tree,
src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
46var tree = context.Tree;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (29)
17public static ISet<SyntaxKind> GetPrecedingModifiers(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
21this SyntaxTree syntaxTree,
42this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
48this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
54this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
80this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
92public static bool IsRightOfDotOrArrowOrColonColon(this SyntaxTree syntaxTree, int position, SyntaxToken targetToken, CancellationToken cancellationToken)
99public static bool IsRightOfDotOrArrow(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
102public static bool IsRightOfDot(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
106this SyntaxTree syntaxTree, int position, Func<SyntaxKind, bool> predicate, CancellationToken cancellationToken)
119public static bool IsRightOfNumericLiteral(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
125public static bool IsAfterKeyword(this SyntaxTree syntaxTree, int position, SyntaxKind kind, CancellationToken cancellationToken)
133public static bool IsEntirelyWithinNonUserCodeComment(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
145public static bool IsEntirelyWithinComment(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
155public static bool IsCrefContext(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
168public static bool IsEntirelyWithinCrefSyntax(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
180this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
224this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
242this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
259this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
273this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
297this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
382this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
389public static bool IsEntirelyWithinStringLiteral(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
393this SyntaxTree syntaxTree, int position, out SyntaxToken stringLiteral, CancellationToken cancellationToken)
442this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
470this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
532public static bool IsPreProcessorKeywordContext(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
540public static bool IsPreProcessorKeywordContext(this SyntaxTree syntaxTree, int position, SyntaxToken preProcessorTokenOnLeftOfPosition)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
46var tree = context.Tree;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (20)
76internal abstract bool ExperimentalFeaturesEnabled(SyntaxTree tree);
550var oldTree = oldRoot.SyntaxTree;
551var newTree = newRoot.SyntaxTree;
756var tree = await oldDocument.GetRequiredSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
762var tree = await newDocument.GetRequiredSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
776private static async ValueTask<DocumentSemanticModel> GetDocumentSemanticModelAsync(Project project, Document? document, SyntaxTree tree, CancellationToken cancellationToken)
1511private ActiveStatement GetActiveStatementWithSpan(UnmappedActiveStatement oldStatement, SyntaxTree newTree, TextSpan newSpan, RudeEditDiagnosticsBuilder diagnostics, CancellationToken cancellationToken)
1761private ActiveStatementExceptionRegions GetExceptionRegions(List<SyntaxNode> exceptionHandlingAncestors, SyntaxTree tree, CancellationToken cancellationToken)
2222var oldTree = topMatch.OldRoot.SyntaxTree;
2223var newTree = topMatch.NewRoot.SyntaxTree;
2710var oldTree = editScript.Match.OldRoot.SyntaxTree;
2711var newTree = editScript.Match.NewRoot.SyntaxTree;
5376SyntaxTree newTree,
5453var oldSyntaxTree = topMatch.OldRoot.SyntaxTree;
5454var newSyntaxTree = topMatch.NewRoot.SyntaxTree;
5687private static bool IsPartialTypeEdit(ISymbol? oldSymbol, ISymbol? newSymbol, SyntaxTree oldSyntaxTree, SyntaxTree newSyntaxTree)
5691static bool IsNotInDocument(SyntaxReference reference, SyntaxTree syntaxTree)
5694static bool IsPartialTypeEdit(ISymbol? symbol, SyntaxTree tree)
6299protected SyntaxNode? GetSymbolDeclarationSyntax(ISymbol symbol, SyntaxTree tree, CancellationToken cancellationToken)
EditAndContinue\ActiveStatementsMap.cs (5)
45private ImmutableDictionary<SyntaxTree, ImmutableArray<UnmappedActiveStatement>> _lazyOldDocumentActiveStatements;
56_lazyOldDocumentActiveStatements = ImmutableDictionary<SyntaxTree, ImmutableArray<UnmappedActiveStatement>>.Empty;
174var oldTree = await oldDocument.DocumentState.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
180internal ImmutableArray<UnmappedActiveStatement> GetOldActiveStatements(IEditAndContinueAnalyzer analyzer, SyntaxTree oldSyntaxTree, SourceText oldText, SyntaxNode oldRoot, CancellationToken cancellationToken)
190private ImmutableArray<UnmappedActiveStatement> CalculateOldActiveStatementsAndExceptionRegions(IEditAndContinueAnalyzer analyzer, SyntaxTree oldTree, SourceText oldText, SyntaxNode oldRoot, CancellationToken cancellationToken)
NavigationBar\AbstractNavigationBarItemService.cs (3)
44Solution solution, ISymbol symbol, SyntaxTree tree, Func<SyntaxReference, TextSpan> computeFullSpan)
50Solution solution, ISymbol symbol, SyntaxTree tree,
91Solution solution, ISymbol symbol, SyntaxTree tree, ISymbolDeclarationService symbolDeclarationService)
Compilation\VisualBasicCompilation.vb (87)
55Private Shared ReadOnly s_myTemplateCache As ConcurrentLruCache(Of VisualBasicParseOptions, SyntaxTree) =
56New ConcurrentLruCache(Of VisualBasicParseOptions, SyntaxTree)(capacity:=5)
89Private ReadOnly _syntaxTrees As ImmutableArray(Of SyntaxTree)
91Private ReadOnly _syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer)
97Private _lazyAllSyntaxTrees As ImmutableArray(Of SyntaxTree)
103Private ReadOnly _rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry)
106''' Imports appearing in <see cref="SyntaxTree"/>s in this compilation.
113Private _lazyImportClauseDependencies As ConcurrentDictionary(Of (SyntaxTree As SyntaxTree, ImportsClausePosition As Integer), ImmutableArray(Of AssemblySymbol))
132Public ReadOnly Tree As Lazy(Of SyntaxTree)
135Public Sub New(treeOpt As Func(Of SyntaxTree), rootNamespaceOpt As Func(Of RootSingleNamespaceDeclaration))
136Me.Tree = New Lazy(Of SyntaxTree)(treeOpt)
168Private _lazyMyTemplate As SyntaxTree = VisualBasicSyntaxTree.Dummy
180Private _lazyCompilationUnitCompletedTrees As HashSet(Of SyntaxTree)
241Friend Property MyTemplate As SyntaxTree
251Dim tree As SyntaxTree = Nothing
288Set(value As SyntaxTree)
327Optional syntaxTrees As IEnumerable(Of SyntaxTree) = Nothing,
333If(syntaxTrees IsNot Nothing, syntaxTrees.Cast(Of SyntaxTree), Nothing),
346Optional syntaxTree As SyntaxTree = Nothing,
359If((syntaxTree IsNot Nothing), {syntaxTree}, SpecializedCollections.EmptyEnumerable(Of SyntaxTree)()),
370syntaxTrees As IEnumerable(Of SyntaxTree),
387Dim declMap = ImmutableDictionary.Create(Of SyntaxTree, DeclarationTableEntry)()
394ImmutableArray(Of SyntaxTree).Empty,
395ImmutableDictionary.Create(Of SyntaxTree, Integer)(),
421syntaxTrees As ImmutableArray(Of SyntaxTree),
422syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer),
423rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry),
441Debug.Assert(syntaxTrees.SetEquals(rootNamespaces.Keys.AsImmutable(), EqualityComparer(Of SyntaxTree).Default))
487Private Function CommonLanguageVersion(syntaxTrees As ImmutableArray(Of SyntaxTree)) As LanguageVersion
527syntaxTrees As ImmutableArray(Of SyntaxTree),
528syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer),
529rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry),
637declMap = ImmutableDictionary.Create(Of SyntaxTree, DeclarationTableEntry)()
879Public Shadows ReadOnly Property SyntaxTrees As ImmutableArray(Of SyntaxTree)
889Friend Shadows ReadOnly Property AllSyntaxTrees As ImmutableArray(Of SyntaxTree)
892Dim builder = ArrayBuilder(Of SyntaxTree).GetInstance()
910Public Shadows Function ContainsSyntaxTree(syntaxTree As SyntaxTree) As Boolean
914Public Shadows Function AddSyntaxTrees(ParamArray trees As SyntaxTree()) As VisualBasicCompilation
915Return AddSyntaxTrees(DirectCast(trees, IEnumerable(Of SyntaxTree)))
918Public Shadows Function AddSyntaxTrees(trees As IEnumerable(Of SyntaxTree)) As VisualBasicCompilation
932Dim builder = ArrayBuilder(Of SyntaxTree).GetInstance()
944For Each tree As SyntaxTree In trees
978tree As SyntaxTree,
981ByRef declMap As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry),
992Private Shared Function ForTree(tree As SyntaxTree, options As VisualBasicCompilationOptions, isSubmission As Boolean) As RootSingleNamespaceDeclaration
996Public Shadows Function RemoveSyntaxTrees(ParamArray trees As SyntaxTree()) As VisualBasicCompilation
997Return RemoveSyntaxTrees(DirectCast(trees, IEnumerable(Of SyntaxTree)))
1000Public Shadows Function RemoveSyntaxTrees(trees As IEnumerable(Of SyntaxTree)) As VisualBasicCompilation
1010Dim removeSet As New HashSet(Of SyntaxTree)()
1014For Each tree As SyntaxTree In trees
1033Dim ordinalMap = ImmutableDictionary.Create(Of SyntaxTree, Integer)()
1034Dim builder = ArrayBuilder(Of SyntaxTree).GetInstance()
1049tree As SyntaxTree,
1050ByRef declMap As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry),
1065Return UpdateSyntaxTrees(ImmutableArray(Of SyntaxTree).Empty,
1066ImmutableDictionary.Create(Of SyntaxTree, Integer)(),
1067ImmutableDictionary.Create(Of SyntaxTree, DeclarationTableEntry)(),
1072Public Shadows Function ReplaceSyntaxTree(oldTree As SyntaxTree, newTree As SyntaxTree) As VisualBasicCompilation
1270Friend Overrides Function GetSyntaxTreeOrdinal(tree As SyntaxTree) As Integer
1705Private Overloads Sub ReportUnusedImports(filterTree As SyntaxTree, diagnostics As BindingDiagnosticBag, cancellationToken As CancellationToken)
1712Dim infoTree As SyntaxTree = info.Tree
1761Private Sub AddImportsDependencies(diagnostics As BindingDiagnosticBag, infoTree As SyntaxTree, clauseSpan As TextSpan)
1770Friend Overrides Sub CompleteTrees(filterTree As SyntaxTree)
1778For Each tree As SyntaxTree In SyntaxTrees
1785Private Sub CompleteTree(tree As SyntaxTree)
1795Interlocked.CompareExchange(_lazyCompilationUnitCompletedTrees, New HashSet(Of SyntaxTree)(), Nothing)
1821Friend Sub RecordImportsClauseDependencies(syntaxTree As SyntaxTree, importsClausePosition As Integer, dependencies As ImmutableArray(Of AssemblySymbol))
1832Public ReadOnly Tree As SyntaxTree
2042Public Shadows Function GetSemanticModel(syntaxTree As SyntaxTree, Optional ignoreAccessibility As Boolean = False) As SemanticModel
2053Friend Overrides Function CreateSemanticModel(syntaxTree As SyntaxTree, options As SemanticModelOptions) As SemanticModel
2213Private Sub AddClsComplianceDiagnostics(diagnostics As BindingDiagnosticBag, cancellationToken As CancellationToken, Optional filterTree As SyntaxTree = Nothing, Optional filterSpanWithinTree As TextSpan? = Nothing)
2234Private Shared Iterator Function FilterDiagnosticsByLocation(diagnostics As IEnumerable(Of Diagnostic), tree As SyntaxTree, filterSpanWithinTree As TextSpan?) As IEnumerable(Of Diagnostic)
2243tree As SyntaxTree,
2301Private Sub GetDiagnosticsForMethodBodiesInTree(tree As SyntaxTree, filterSpanWithinTree As TextSpan?, hasDeclarationErrors As Boolean, diagnostics As BindingDiagnosticBag, cancellationToken As CancellationToken)
2631tree As SyntaxTree,
2764Protected Overrides Function CommonGetSemanticModel(syntaxTree As SyntaxTree, options As SemanticModelOptions) As SemanticModel
2768Protected Overrides ReadOnly Property CommonSyntaxTrees As ImmutableArray(Of SyntaxTree)
2774Protected Overrides Function CommonAddSyntaxTrees(trees As IEnumerable(Of SyntaxTree)) As Compilation
2775Dim array = TryCast(trees, SyntaxTree())
2784Return Me.AddSyntaxTrees(trees.Cast(Of SyntaxTree)())
2787Protected Overrides Function CommonRemoveSyntaxTrees(trees As IEnumerable(Of SyntaxTree)) As Compilation
2788Dim array = TryCast(trees, SyntaxTree())
2797Return Me.RemoveSyntaxTrees(trees.Cast(Of SyntaxTree)())
2804Protected Overrides Function CommonReplaceSyntaxTree(oldTree As SyntaxTree, newTree As SyntaxTree) As Compilation
2812Protected Overrides Function CommonContainsSyntaxTree(syntaxTree As SyntaxTree) As Boolean
Syntax\VisualBasicSyntaxNode.vb (10)
28Friend Sub New(green As GreenNode, position As Integer, syntaxTree As SyntaxTree)
47Friend Shadows ReadOnly Property SyntaxTree As SyntaxTree
51Dim tree As SyntaxTree = Nothing
77Dim alternativeTree As SyntaxTree = Interlocked.CompareExchange(stack.Pop()._syntaxTree, tree, Nothing)
184Friend Function GetSyntaxErrors(tree As SyntaxTree) As ReadOnlyCollection(Of Diagnostic)
188Friend Shared Function DoGetSyntaxErrors(tree As SyntaxTree, nodeOrToken As SyntaxNodeOrToken) As ReadOnlyCollection(Of Diagnostic)
240Private Shared Sub ProcessTrivia(tree As SyntaxTree,
267Private Shared Function CreateSyntaxError(tree As SyntaxTree, nodeOrToken As SyntaxNodeOrToken, errorInfo As DiagnosticInfo) As Diagnostic
274Private Shared Function CreateSyntaxError(tree As SyntaxTree, nodeOrToken As SyntaxTrivia, errorInfo As DiagnosticInfo) As Diagnostic
383Protected Overrides ReadOnly Property SyntaxTreeCore As SyntaxTree
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)
Workspace\Solution\DocumentState.cs (19)
26private static readonly ConditionalWeakTable<SyntaxTree, DocumentId> s_syntaxTreeToIdMap = new();
170var tree = treeFactory.ParseSyntaxTree(filePath, options, text, cancellationToken);
240var oldTree = oldTreeAndVersion.Tree;
243var newTree = oldTree.WithChangedText(newText);
250private static TreeAndVersion MakeNewTreeAndVersion(SyntaxTree oldTree, SourceText oldText, VersionStamp oldVersion, SyntaxTree newTree, SourceText newText, VersionStamp newVersion)
259private static bool TopLevelChanged(SyntaxTree oldTree, SourceText oldText, SyntaxTree newTree, SourceText newText)
351var existingTree = existingTreeAndVersion.Tree;
353SyntaxTree? newTree = null;
502if (TryGetSyntaxTree(out var priorTree))
538var tree = factory.CreateSyntaxTree(attributes.SyntaxTreeFilePath, options, text: null, encoding, checksumAlgorithm, newRoot);
584public bool TryGetSyntaxTree([NotNullWhen(returnValue: true)] out SyntaxTree? syntaxTree)
598public async ValueTask<SyntaxTree> GetSyntaxTreeAsync(CancellationToken cancellationToken)
610internal SyntaxTree GetSyntaxTree(CancellationToken cancellationToken)
652private static void BindSyntaxTreeToId(SyntaxTree tree, DocumentId id)
664public static DocumentId? GetDocumentIdForTree(SyntaxTree tree)
671SyntaxTree newTree,
673SyntaxTree? oldTree = null,
Workspace\Solution\SourceGeneratedDocumentState.cs (3)
107var newTree = factory.CreateSyntaxTree(documentIdentity.FilePath, parseOptions, generatedSourceText, generatedSourceText.Encoding, generatedSourceText.ChecksumAlgorithm, syntaxNode);
230if (this.TryGetSyntaxTree(out var tree) &&
239var newTree = factory.CreateSyntaxTree(Attributes.SyntaxTreeFilePath, ParseOptions, sourceText, sourceText.Encoding, sourceText.ChecksumAlgorithm, newRoot);
src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (2)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (9)
33ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty);
36private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions;
38private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
69var perTreeOptionsBuilder = PooledDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.GetInstance();
70foreach (var tree in compilation.SyntaxTrees)
77static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider)
84public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
102public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
112private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (30)
31private static bool TryGetSyntaxTreeForOption(ISymbol symbol, [NotNullWhen(returnValue: true)] out SyntaxTree? tree)
53=> TryGetSyntaxTreeForOption(symbol, out var tree)
60SyntaxTree tree,
71=> TryGetSyntaxTreeForOption(symbol, out var tree)
78SyntaxTree tree,
89=> TryGetSyntaxTreeForOption(symbol, out var tree)
96SyntaxTree tree,
104SyntaxTree tree,
111SyntaxTree tree,
122=> TryGetSyntaxTreeForOption(symbol, out var tree)
129SyntaxTree tree,
138SyntaxTree tree,
154SyntaxTree tree,
181SyntaxTree tree,
194=> TryGetSyntaxTreeForOption(symbol, out var tree)
202SyntaxTree tree,
214SyntaxTree tree,
226SyntaxTree tree,
242SyntaxTree tree,
249SyntaxTree tree,
302=> TryGetSyntaxTreeForOption(symbol, out var tree)
311=> TryGetSyntaxTreeForOption(symbol, out var tree)
326SyntaxTree? tree,
340SyntaxTree? tree,
389SyntaxTree? tree,
428SyntaxTree tree,
436SyntaxTree tree,
443SyntaxTree tree,
450SyntaxTree tree,
458SyntaxTree? tree,
src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)
src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (2)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (9)
33ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty);
36private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions;
38private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
69var perTreeOptionsBuilder = PooledDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.GetInstance();
70foreach (var tree in compilation.SyntaxTrees)
77static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider)
84public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
102public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality)
112private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (30)
31private static bool TryGetSyntaxTreeForOption(ISymbol symbol, [NotNullWhen(returnValue: true)] out SyntaxTree? tree)
53=> TryGetSyntaxTreeForOption(symbol, out var tree)
60SyntaxTree tree,
71=> TryGetSyntaxTreeForOption(symbol, out var tree)
78SyntaxTree tree,
89=> TryGetSyntaxTreeForOption(symbol, out var tree)
96SyntaxTree tree,
104SyntaxTree tree,
111SyntaxTree tree,
122=> TryGetSyntaxTreeForOption(symbol, out var tree)
129SyntaxTree tree,
138SyntaxTree tree,
154SyntaxTree tree,
181SyntaxTree tree,
194=> TryGetSyntaxTreeForOption(symbol, out var tree)
202SyntaxTree tree,
214SyntaxTree tree,
226SyntaxTree tree,
242SyntaxTree tree,
249SyntaxTree tree,
302=> TryGetSyntaxTreeForOption(symbol, out var tree)
311=> TryGetSyntaxTreeForOption(symbol, out var tree)
326SyntaxTree? tree,
340SyntaxTree? tree,
389SyntaxTree? tree,
428SyntaxTree tree,
436SyntaxTree tree,
443SyntaxTree tree,
450SyntaxTree tree,
458SyntaxTree? tree,
src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
38public static bool IsScript(this SyntaxTree syntaxTree)
46this SyntaxTree syntaxTree,
56this SyntaxTree syntaxTree,
65this SyntaxTree syntaxTree,
98public static bool IsEntirelyHidden(this SyntaxTree tree, TextSpan span, CancellationToken cancellationToken)
123public static bool IsBeforeFirstToken(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
132this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
171this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool findInsideTrivia = false)
204this SyntaxTree syntaxTree,
219this SyntaxTree syntaxTree,
230public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
252public static SyntaxNode FindNode(this SyntaxTree syntaxTree, TextSpan? span, bool findInTrivia, bool getInnermostNodeForTie, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (4)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token)
90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken)
96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken)