14 overrides of Length
GenerateDocumentationAndConfigFiles (1)
Microsoft.CodeAnalysis (7)
Microsoft.CodeAnalysis.Analyzers (1)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
Microsoft.CodeAnalysis.Workspaces (1)
Roslyn.Diagnostics.Analyzers (1)
194 references to Length
dotnet-format (1)
GenerateDocumentationAndConfigFiles (4)
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.CodeAnalysis (70)
Text\CompositeText.cs (17)
44Debug.Assert(_segments[i].Length > 0);
45offset += _segments[i].Length;
100var copyLength = Math.Min(count, segment.Length - segOffset);
158var copyLength = Math.Min(count, segment.Length - segOffset);
211segments.RemoveAll(static (s, _, _) => s.Length == 0, arg: 0);
218if (prevSegment.Length > 0 && prevSegment[^1] == '\r' && curSegment[0] == '\n')
222segments[i - 1] = prevSegment.GetSubText(new TextSpan(0, prevSegment.Length - 1));
224segments[i + 1] = curSegment.GetSubText(new TextSpan(1, curSegment.Length - 1));
233segments.RemoveAll(static (s, _, _) => s.Length == 0, arg: 0);
293if (segments[i].Length <= segmentSize)
299if (segments[j].Length > segmentSize)
326if (segments[i].Length <= segmentSize)
328int combinedLength = segments[i].Length;
334if (segments[j].Length > segmentSize)
340combinedLength += segments[j].Length;
377length += segment.Length;
452Debug.Assert(segment.Length > 0);
Text\SourceText.cs (26)
409get { return this.Length; }
464/// greater than <see cref="Length"/>.</exception>
492if (span.End > this.Length)
510else if (spanLength == this.Length && span.Start == 0)
525if (start < 0 || start > this.Length)
536return this.GetSubText(new TextSpan(start, this.Length - start));
545this.Write(textWriter, new TextSpan(0, this.Length), cancellationToken);
640for (int index = 0, length = this.Length; index < length; index += CharBufferSize)
714return ToString(new TextSpan(0, this.Length));
729int position = Math.Max(Math.Min(span.Start, this.Length), 0);
730int length = Math.Min(span.End, this.Length) - position;
787if (change.Span.End > this.Length)
838if (position < this.Length)
840var subText = this.GetSubText(new TextSpan(position, this.Length - position));
909return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), this.Length));
1039return TextLine.FromSpanUnsafe(_text, TextSpan.FromBounds(start, _text.Length), lineBreakLength: 0);
1053if (position < 0 || position > _text.Length)
1101var length = this.Length;
1119if (0 == this.Length)
1126var lineStarts = new SegmentedList<uint>(Length / 64)
1239if (this.Length != other.Length)
1251for (int position = 0, length = this.Length; position < length; position += CharBufferSize)
1253var count = Math.Min(this.Length - position, CharBufferSize);
1387public override int Length => _underlying.Length;
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (8)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp.Features (10)
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Microsoft.CodeAnalysis.Features (32)
Microsoft.CodeAnalysis.Razor.Compiler (15)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.VisualBasic (7)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Microsoft.CodeAnalysis.Workspaces (19)
Roslyn.Diagnostics.Analyzers (4)