36 references to Length
Microsoft.AspNetCore.App.Analyzers (36)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (5)
37public bool IsMissing => VirtualChars.Length == 0; 63if (VirtualChars.Length == 0) 68var start = VirtualChars.Length == 0 ? int.MaxValue : VirtualChars[0].Span.Start; 69var end = VirtualChars.Length == 0 ? int.MinValue : VirtualChars[VirtualChars.Length - 1].Span.End;
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxTrivia.cs (1)
27Debug.Assert(virtualChars.Length > 0);
Infrastructure\RoutePattern\RoutePatternLexer.cs (19)
26public VirtualChar CurrentChar => Position < Text.Length ? Text[Position] : default; 36if (Position == Text.Length) 77if (position + i >= Text.Length || 89if (Position == Text.Length) 99while (Position < Text.Length) 174if (Position == Text.Length) 182while (Position < Text.Length) 252if (Position == Text.Length) 259while (Position < Text.Length) 308if (position + 1 >= Text.Length || Text[position + 1].Value != c) 320while (currentPosition < Text.Length && Text[currentPosition].Value == c) 343if (Position == Text.Length) 351while (Position < Text.Length) 393if (Position == Text.Length) 400while (Position < Text.Length) 436if (Position == Text.Length) 442while (Position < Text.Length) 472if (Position == Text.Length) 478while (current < Text.Length)
Infrastructure\RoutePattern\RoutePatternParser.cs (2)
65Debug.Assert(_lexer.Position == _lexer.Text.Length); 254encodeSlashes = catchAllNode.AsteriskToken.VirtualChars.Length == 1;
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (3)
79if (result.Length > 0) 92for (var i = 1; i < result.Length; i++) 101for (var i = 1; i < result.Length; i++)
Infrastructure\VirtualChars\VirtualCharSequence.cs (5)
84public bool IsEmpty => Length == 0; 97public VirtualChar Last() => this[Length - 1]; 140for (var i = this.Length - 1; i >= 0; i--) 179=> this.GetSubSequence(TextSpan.FromBounds(count, this.Length)); 194return this.GetSubSequence(TextSpan.FromBounds(start, this.Length));
Infrastructure\VirtualChars\VirtualCharSequence.Enumerator.cs (1)
23public bool MoveNext() => ++_position < _virtualCharSequence.Length;