11 overrides of Length
Microsoft.CodeAnalysis.CSharp (3)
Syntax\CSharpSyntaxTree.Dummy.cs (1)
49public override int Length
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
60public override int Length
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
83public override int Length
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
988public override int Length
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\Mocks\MockCSharpSyntaxTree.cs (1)
46public override int Length
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
61public override int Length
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\VisualBasicSyntaxTree.DummySyntaxTree.vb (1)
43Public Overrides ReadOnly Property Length As Integer
Syntax\VisualBasicSyntaxTree.LazySyntaxTree.vb (1)
66Public Overrides ReadOnly Property Length As Integer
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
95Public Overrides ReadOnly Property Length As Integer
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
ParserTestUtilities.vb (1)
533Public Overrides ReadOnly Property Length As Integer
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.ParsedSyntaxTree.vb (1)
55Public Overrides ReadOnly Property Length As Integer
38 references to Length
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalysisScope.cs (1)
170if (filterSpan.GetValueOrDefault().Start == 0 && filterSpan.GetValueOrDefault().Length == filterFile.GetValueOrDefault().SourceTree!.Length)
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (1)
102if (location.SourceSpan.End > location.SourceTree.Length)
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
71if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.CSharp (5)
FlowAnalysis\NullableWalker.cs (1)
1554return compilation.SyntaxTrees.Any(static tree => ((CSharpSyntaxTree)tree).IsNullableAnalysisEnabled(new Text.TextSpan(0, tree.Length)) == true);
SymbolDisplay\SymbolDisplay.cs (1)
261else if (positionOpt < 0 || positionOpt > semanticModelOpt.SyntaxTree.Length) // Note: not >= since EOF is allowed.
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
252compilation.SyntaxTrees.Any(static tree => ((CSharpSyntaxTree)tree).IsNullableAnalysisEnabled(new TextSpan(0, tree.Length)) == true);
Syntax\CSharpSyntaxTree.cs (2)
550return this.WithChanges(newText, new[] { new TextChangeRange(new TextSpan(0, this.Length), newText.Length) }); 564if (workingChanges.Count == 1 && workingChanges[0].Span == new TextSpan(0, this.Length) && workingChanges[0].NewLength == newText.Length)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\GlobalUsingDirectiveTests.cs (3)
3256comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDiagnostics(TextSpan.FromBounds(20, comp2.SyntaxTrees[0].Length - 1)).Verify( 3264comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDiagnostics(TextSpan.FromBounds(20, comp2.SyntaxTrees[1].Length - 1)).Verify( 3272comp2.GetSemanticModel(comp2.SyntaxTrees[2]).GetDiagnostics(TextSpan.FromBounds(20, comp2.SyntaxTrees[2].Length - 1)).Verify(
Semantics\InteractiveUsingTests.cs (2)
585tree.Length, 595tree.Length,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
DeclarationTests.cs (1)
990get { return _underlyingTree.Length; }
Symbols\Source\NullablePublicAPITests.cs (1)
1770return comp.IsNullableAnalysisEnabledIn(tree, new Text.TextSpan(0, tree.Length));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ParserRegressionTests.cs (1)
165var textSpan = Text.TextSpan.FromBounds(0, tree.Length);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
454Assert.True(compilation.IsNullableAnalysisEnabledIn((CSharpSyntaxTree)tree, new TextSpan(0, tree.Length)));
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Utilities\VirtualTreePoint.cs (1)
17Contract.ThrowIfFalse(position >= 0 && position <= tree.Length);
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
350if (location.SourceSpan.End > location.SourceTree.Length)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (4)
389if (start >= tree.Length) 390start = tree.Length - 1; 391if (end >= tree.Length) 392end = tree.Length - 1;
Microsoft.CodeAnalysis.VisualBasic (3)
SymbolDisplay\SymbolDisplay.vb (1)
128ElseIf positionOpt < 0 OrElse positionOpt > semanticModelOpt.SyntaxTree.Length Then 'Note: not >= since EOF is allowed.
Syntax\VisualBasicSyntaxTree.vb (2)
108Return Me.WithChanges(newText, {New TextChangeRange(New TextSpan(0, Me.Length), newText.Length)}) 120If changes.Length = 1 AndAlso changes(0).Span = New TextSpan(0, Me.Length) AndAlso changes(0).NewLength = newText.Length Then
Microsoft.CodeAnalysis.VisualBasic.Features (2)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
102Dim token = tree.GetRoot(cancellationToken).FindToken(If(position <> tree.Length, position, Math.Max(0, position - 1)))
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
32Dim token = root.FindToken(If(position <> tree.Length, position, Math.Max(0, position - 1)))
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
71if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Workspace\Solution\DocumentState.cs (2)
690if (newTree.Length == newText.Length) 703FatalError.ReportAndCatch(new Exception($"tree and text has different length {newTree.Length} vs {newText.Length}"), ErrorSeverity.Critical);
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SolutionTests\SolutionTests.cs (5)
3786Assert.Equal(tree.Length, tree2.Length); 3814Assert.Equal(newRoot.FullSpan.Length, tree3.Length); 3825Assert.Equal(tree.Length, tree4.Length);