57 references to LineVisibility
Microsoft.CodeAnalysis (9)
Syntax\LineDirectiveMap.cs (3)
106public abstract LineVisibility GetLineVisibility(SourceText sourceText, int position); 167protected abstract LineVisibility GetUnknownStateVisibility(int index); 243entry.State == PositionState.Unknown && GetUnknownStateVisibility(currentIndex) == LineVisibility.Hidden)
Syntax\SyntaxTree.cs (3)
255public virtual LineVisibility GetLineVisibility(int position, CancellationToken cancellationToken = default) 257return LineVisibility.Visible; 271isHiddenPosition = GetLineVisibility(span.Start) == LineVisibility.Hidden;
Syntax\SyntaxTreeExtensions.cs (3)
113var lineVisibility = tree.GetLineVisibility(position, cancellationToken); 114return lineVisibility == LineVisibility.Hidden || lineVisibility == LineVisibility.BeforeFirstLineDirective;
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (3)
113var lineVisibility = tree.GetLineVisibility(position, cancellationToken); 114return lineVisibility == LineVisibility.Hidden || lineVisibility == LineVisibility.BeforeFirstLineDirective;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
30var lineVisibility = tree.GetLineVisibility(position, cancellationToken2); 31return lineVisibility is LineVisibility.Hidden or LineVisibility.BeforeFirstLineDirective;
Microsoft.CodeAnalysis.CSharp (8)
Syntax\CSharpLineDirectiveMap.cs (7)
180public override LineVisibility GetLineVisibility(SourceText sourceText, int position) 189return LineVisibility.Visible; 205return LineVisibility.BeforeFirstLineDirective; 209return LineVisibility.Visible; 214return LineVisibility.Visible; 217return LineVisibility.Hidden; 225protected override LineVisibility GetUnknownStateVisibility(int index)
Syntax\CSharpSyntaxTree.cs (1)
669public override LineVisibility GetLineVisibility(int position, CancellationToken cancellationToken = default)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Diagnostics\LineSpanDirectiveTests.cs (12)
249LineVisibility.BeforeFirstLineDirective, 250LineVisibility.Hidden, 251LineVisibility.Hidden, 252LineVisibility.Hidden, 253LineVisibility.Hidden, 254LineVisibility.Hidden, 255LineVisibility.Visible, 256LineVisibility.Visible, 257LineVisibility.Visible, 258LineVisibility.Visible, 259LineVisibility.Hidden, 260LineVisibility.Hidden,
Microsoft.CodeAnalysis.Features (1)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
266if (syntaxTree.GetLineVisibility(span.Start, cancellationToken) == LineVisibility.Hidden)
Microsoft.CodeAnalysis.VisualBasic (10)
Syntax\VisualBasicLineDirectiveMap.vb (9)
147Public Overrides Function GetLineVisibility(sourceText As SourceText, position As Integer) As LineVisibility 154Protected Overrides Function GetUnknownStateVisibility(index As Integer) As LineVisibility 158Private Overloads Function GetLineVisibility(index As Integer) As LineVisibility 175Return LineVisibility.Visible 203Return If(lookaheadEntryState = PositionState.Hidden, LineVisibility.Hidden, LineVisibility.Visible) 206Return If(entry.State = PositionState.Hidden, LineVisibility.Hidden, LineVisibility.Visible) 215isHiddenPosition = GetLineVisibility(index) = LineVisibility.Hidden
Syntax\VisualBasicSyntaxTree.vb (1)
455Public Overrides Function GetLineVisibility(position As Integer, Optional cancellationToken As CancellationToken = Nothing) As LineVisibility
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Syntax\ManualTests.vb (5)
143Assert.Equal(LineVisibility.Visible, tree.GetLineVisibility(0)) 144Assert.Equal(LineVisibility.Visible, tree.GetLineVisibility(source.Length - 2)) 145Assert.Equal(LineVisibility.Visible, tree.GetLineVisibility(source.IndexOf("a()", StringComparison.Ordinal))) 146Assert.Equal(LineVisibility.Visible, tree.GetLineVisibility(source.IndexOf("b()", StringComparison.Ordinal))) 147Assert.Equal(LineVisibility.Visible, tree.GetLineVisibility(source.IndexOf("c()", StringComparison.Ordinal)))
Microsoft.CodeAnalysis.Workspaces (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (3)
113var lineVisibility = tree.GetLineVisibility(position, cancellationToken); 114return lineVisibility == LineVisibility.Hidden || lineVisibility == LineVisibility.BeforeFirstLineDirective;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
30var lineVisibility = tree.GetLineVisibility(position, cancellationToken2); 31return lineVisibility is LineVisibility.Hidden or LineVisibility.BeforeFirstLineDirective;