9 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
58 references to Length
GenerateDocumentationAndConfigFiles (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Metrics (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Metrics.Legacy (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalysisScope.cs (1)
169if (filterSpan.GetValueOrDefault().Start == 0 && filterSpan.GetValueOrDefault().Length == filterFile.GetValueOrDefault().SourceTree!.Length)
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (1)
102if (location.SourceSpan.End > location.SourceTree.Length)
Microsoft.CodeAnalysis.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.CSharp (5)
FlowAnalysis\NullableWalker.cs (1)
1666return 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)
551return this.WithChanges(newText, new[] { new TextChangeRange(new TextSpan(0, this.Length), newText.Length) }); 565if (workingChanges.Count == 1 && workingChanges[0].Span == new TextSpan(0, this.Length) && workingChanges[0].NewLength == newText.Length)
Microsoft.CodeAnalysis.CSharp.Features (1)
ChangeSignature\CSharpChangeSignatureService.cs (1)
121var token = root.FindToken(position != tree.Length ? position : Math.Max(0, position - 1));
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.Features (1)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
157if (location.SourceSpan.End > location.SourceTree.Length)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\CodeCleanup\AbstractCodeCleanupService.cs (1)
207var range = new TextSpan(0, tree.Length);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
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)
109Return Me.WithChanges(newText, {New TextChangeRange(New TextSpan(0, Me.Length), newText.Length)}) 121If changes.Length = 1 AndAlso changes(0).Span = New TextSpan(0, Me.Length) AndAlso changes(0).NewLength = newText.Length Then
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Workspace\Solution\DocumentState.cs (2)
677if (newTree.Length == newText.Length) 690FatalError.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)
3819Assert.Equal(tree.Length, tree2.Length); 3847Assert.Equal(newRoot.FullSpan.Length, tree3.Length); 3858Assert.Equal(tree.Length, tree4.Length);
Roslyn.Diagnostics.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Test.Utilities (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;
Text.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
74if (position > syntaxTree.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
202end = tree.Length;