1 write to Length
Microsoft.CodeAnalysis (1)
542 references to Length
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.App.Analyzers (11)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.CodeAnalysis (65)
Syntax\SyntaxDiffer.cs (21)
115delta += change.Range.NewLength - change.Range.Span.Length;
310if (sim >= Math.Max(_oldNodes.Peek().FullSpan.Length, _newNodes.Peek().FullSpan.Length))
328if (child.FullSpan.Length > 0)
358var sim = node.FullSpan.Length;
372if (sim == node.FullSpan.Length && node.IsToken)
404similarity = node.FullSpan.Length;
459w += tr.FullSpan.Length;
468w += tr.FullSpan.Length;
490w += n2.FullSpan.Length;
549RecordChange(new TextChangeRange(oldSpan, newSpan.Length), removedNode, insertedNode);
559RecordChange(new ChangeRecord(new TextChangeRange(oldSpan, newSpan.Length), removedNodes, insertedNodes));
569RecordChange(new ChangeRecord(new TextChangeRange(new TextSpan(start, 0), newSpan.Length), null, insertedNodes));
581new TextChangeRange(new TextSpan(last.Range.Span.Start, last.Range.Span.Length + change.Range.Span.Length), last.Range.NewLength + change.Range.NewLength),
604new TextChangeRange(new TextSpan(last.Range.Span.Start, last.Range.Span.Length + textChangeRange.Span.Length), last.Range.NewLength + textChangeRange.NewLength),
748if (cr.Range.Span.Length > 0 && cr.Range.NewLength > 0)
763new TextSpan(range.Span.Start + commonLeadingCount, range.Span.Length - (commonLeadingCount + commonTrailingCount)),
778if (range.Span.Length > 0 || range.NewLength > 0)
827var builder = new StringBuilder(span.Length);
Microsoft.CodeAnalysis.CodeStyle (53)
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp (12)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (23)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (51)
LexicalAndXml\LexicalTests.cs (26)
3879Assert.True(trivia.Span.Length == 8);
3958Assert.Equal(22, trivia.Span.Length);
3971Assert.Equal(16, trivia.Span.Length);
3981Assert.Equal(2, trivia.Span.Length);
3986Assert.Equal(13, trivia.Span.Length);
3995Assert.Equal(16, trivia.Span.Length);
4004Assert.Equal(2, trivia.Span.Length);
4008Assert.Equal(34, trivia.Span.Length);
4016Assert.Equal(16, trivia1.Span.Length);
4026Assert.Equal(2, trivia2.Span.Length);
4031Assert.Equal(15, trivia3.Span.Length);
4036Assert.Equal(24, trivia4.Span.Length);
4049Assert.Equal(16, trivia1.Span.Length);
4059Assert.Equal(2, trivia2.Span.Length);
4064Assert.Equal(24, trivia3.Span.Length);
4097Assert.Equal(22, trivia.Span.Length);
4105Assert.Equal(16, trivia.Span.Length);
4110Assert.Equal(2, trivia.Span.Length);
4115Assert.Equal(13, trivia.Span.Length);
4124Assert.Equal(16, trivia.Span.Length);
4128Assert.Equal(2, trivia.Span.Length);
4132Assert.Equal(34, trivia.Span.Length);
4140Assert.Equal(16, trivia1.Span.Length);
4145Assert.Equal(2, trivia2.Span.Length);
4150Assert.Equal(15, trivia3.Span.Length);
4155Assert.Equal(24, trivia4.Span.Length);
Syntax\SyntaxNodeTests.cs (20)
1780Assert.Equal(rootNode.FullSpan.Length, rootNode.ToFullString().Length);
1781Assert.Equal(rootNode.Span.Length, rootNode.ToString().Length);
1798Assert.Equal(rootNode.FullSpan.Length, rootNode.ToFullString().Length);
1799Assert.Equal(rootNode.Span.Length, rootNode.ToString().Length);
3716Assert.Equal(0, idToken.LeadingTrivia.Span.Length); // zero-width elastic trivia
3719Assert.Equal(0, idToken.TrailingTrivia.Span.Length); // zero-width elastic trivia
3732Assert.Equal(1, idToken.LeadingTrivia.Span.Length);
3735Assert.Equal(2, idToken.TrailingTrivia.Span.Length);
3741Assert.Equal(0, namedNode.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3744Assert.Equal(0, namedNode.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3757Assert.Equal(1, namedNode.GetLeadingTrivia().Span.Length);
3760Assert.Equal(2, namedNode.GetTrailingTrivia().Span.Length);
3766Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3769Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3775Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3778Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3798Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3801Assert.Equal(2, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3807Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3810Assert.Equal(2, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
Microsoft.CodeAnalysis.EditorFeatures (7)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (9)
Microsoft.CodeAnalysis.EditorFeatures.Text (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
RenameTracking\RenameTrackingTaggerProviderTests.cs (5)
382state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "cation");
396state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "Complex");
410state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "Dog");
430state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "_");
854state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "Go");
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Microsoft.CodeAnalysis.Features (32)
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
162if (span.Length != 0)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.UnitTests (24)
Microsoft.CodeAnalysis.VisualBasic (13)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
Microsoft.CodeAnalysis.VisualBasic.Features (14)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (26)
TestSyntaxNodes.vb (19)
771Assert.Equal(5, keyword.Span.Length)
772Assert.Equal(6, keyword.FullSpan.Length)
783Assert.Equal(5, keyword.Span.Length)
784Assert.Equal(12, keyword.FullSpan.Length)
792Assert.Equal(7, keyword.Span.Length)
793Assert.Equal(8, keyword.FullSpan.Length)
803Assert.Equal(7, keyword.Span.Length)
804Assert.Equal(16, keyword.FullSpan.Length)
816Assert.Equal(7, endTry.Span.Length)
817Assert.Equal(8, endTry.FullSpan.Length)
923Assert.Equal(0, eof.Span.Length)
927Assert.Equal(0, endIfStmt.Span.Length)
990Assert.Equal(6, kwModule.Span.Length)
991Assert.Equal(7, kwModule.FullSpan.Length)
996Assert.Equal(6, kwModule.Span.Length)
997Assert.Equal(7, kwModule.FullSpan.Length)
1736Assert.Equal(0, tree.GetRoot().FindToken(node.FullSpan.Length - 1).TrailingTrivia.Count)
2187Assert.Equal(sN.FullWidth, cS.FullSpan.Length)
2188Assert.Equal(sN.Width, cS.Span.Length)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (11)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (18)
Microsoft.CodeAnalysis.Workspaces (86)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.ML.InternalCodeAnalyzer (2)
Microsoft.VisualStudio.LanguageServices (4)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (3)
System.Text.RegularExpressions.Generator (1)