1 write to Length
Microsoft.CodeAnalysis (1)
1285 references to Length
GenerateDocumentationAndConfigFiles (62)
Metrics (58)
Metrics.Legacy (58)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.App.Analyzers (11)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.CodeAnalysis (65)
Syntax\SyntaxDiffer.cs (21)
116delta += change.Range.NewLength - change.Range.Span.Length;
311if (sim >= Math.Max(_oldNodes.Peek().FullSpan.Length, _newNodes.Peek().FullSpan.Length))
329if (child.FullSpan.Length > 0)
359var sim = node.FullSpan.Length;
373if (sim == node.FullSpan.Length && node.IsToken)
405similarity = node.FullSpan.Length;
460w += tr.FullSpan.Length;
469w += tr.FullSpan.Length;
491w += n2.FullSpan.Length;
550RecordChange(new TextChangeRange(oldSpan, newSpan.Length), removedNode, insertedNode);
560RecordChange(new ChangeRecord(new TextChangeRange(oldSpan, newSpan.Length), removedNodes, insertedNodes));
570RecordChange(new ChangeRecord(new TextChangeRange(new TextSpan(start, 0), newSpan.Length), null, insertedNodes));
582new TextChangeRange(new TextSpan(last.Range.Span.Start, last.Range.Span.Length + change.Range.Span.Length), last.Range.NewLength + change.Range.NewLength),
605new TextChangeRange(new TextSpan(last.Range.Span.Start, last.Range.Span.Length + textChangeRange.Span.Length), last.Range.NewLength + textChangeRange.NewLength),
749if (cr.Range.Span.Length > 0 && cr.Range.NewLength > 0)
764new TextSpan(range.Span.Start + commonLeadingCount, range.Span.Length - (commonLeadingCount + commonTrailingCount)),
779if (range.Span.Length > 0 || range.NewLength > 0)
828var builder = new StringBuilder(span.Length);
Microsoft.CodeAnalysis.Analyzers (63)
Microsoft.CodeAnalysis.AnalyzerUtilities (58)
Microsoft.CodeAnalysis.BannedApiAnalyzers (62)
Microsoft.CodeAnalysis.CodeStyle (59)
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
Microsoft.CodeAnalysis.CSharp (14)
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (7)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Features (32)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (51)
LexicalAndXml\LexicalTests.cs (26)
3880Assert.True(trivia.Span.Length == 8);
3959Assert.Equal(22, trivia.Span.Length);
3972Assert.Equal(16, trivia.Span.Length);
3982Assert.Equal(2, trivia.Span.Length);
3987Assert.Equal(13, trivia.Span.Length);
3996Assert.Equal(16, trivia.Span.Length);
4005Assert.Equal(2, trivia.Span.Length);
4009Assert.Equal(34, trivia.Span.Length);
4017Assert.Equal(16, trivia1.Span.Length);
4027Assert.Equal(2, trivia2.Span.Length);
4032Assert.Equal(15, trivia3.Span.Length);
4037Assert.Equal(24, trivia4.Span.Length);
4050Assert.Equal(16, trivia1.Span.Length);
4060Assert.Equal(2, trivia2.Span.Length);
4065Assert.Equal(24, trivia3.Span.Length);
4098Assert.Equal(22, trivia.Span.Length);
4106Assert.Equal(16, trivia.Span.Length);
4111Assert.Equal(2, trivia.Span.Length);
4116Assert.Equal(13, trivia.Span.Length);
4125Assert.Equal(16, trivia.Span.Length);
4129Assert.Equal(2, trivia.Span.Length);
4133Assert.Equal(34, trivia.Span.Length);
4141Assert.Equal(16, trivia1.Span.Length);
4146Assert.Equal(2, trivia2.Span.Length);
4151Assert.Equal(15, trivia3.Span.Length);
4156Assert.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);
3754Assert.Equal(0, idToken.LeadingTrivia.Span.Length); // zero-width elastic trivia
3757Assert.Equal(0, idToken.TrailingTrivia.Span.Length); // zero-width elastic trivia
3770Assert.Equal(1, idToken.LeadingTrivia.Span.Length);
3773Assert.Equal(2, idToken.TrailingTrivia.Span.Length);
3779Assert.Equal(0, namedNode.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3782Assert.Equal(0, namedNode.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3795Assert.Equal(1, namedNode.GetLeadingTrivia().Span.Length);
3798Assert.Equal(2, namedNode.GetTrailingTrivia().Span.Length);
3804Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3807Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3813Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3816Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3836Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3839Assert.Equal(2, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
3845Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia
3848Assert.Equal(2, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
Microsoft.CodeAnalysis.EditorFeatures (14)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (12)
Microsoft.CodeAnalysis.EditorFeatures.Text (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
RenameTracking\RenameTrackingTaggerProviderTests.cs (5)
381state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "cation");
395state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "Complex");
409state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "Dog");
429state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "_");
844state.EditorOperations.ReplaceText(new Span(textSpan.Start, textSpan.Length), "Go");
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Microsoft.CodeAnalysis.Features (50)
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
168if (span.Length != 0)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (13)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (62)
Microsoft.CodeAnalysis.PublicApiAnalyzers (58)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (58)
Microsoft.CodeAnalysis.UnitTests (24)
Microsoft.CodeAnalysis.VisualBasic (13)
Microsoft.CodeAnalysis.Workspaces (104)
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Microsoft.ML.InternalCodeAnalyzer (2)
Microsoft.VisualStudio.LanguageServices (8)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Roslyn.Diagnostics.Analyzers (62)
Roslyn.Diagnostics.CSharp.Analyzers (9)
System.Text.RegularExpressions.Generator (1)
Test.Utilities (58)
Text.Analyzers (62)