2 writes to Length
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Capture.cs (1)
16Length = length;
System\Text\RegularExpressions\Match.cs (1)
282Length = interval[1]; // the length of the match
66 references to Length
Aspire.Dashboard (3)
ConsoleLogs\UrlParser.cs (1)
35nextCharIndex = urlMatch.Index + urlMatch.Length;
src\Shared\ConsoleLogs\TimestampParser.cs (2)
22if (match.Index + match.Length >= span.Length) 28content = span[(match.Index + match.Length)..];
Aspire.Hosting (2)
src\Shared\ConsoleLogs\TimestampParser.cs (2)
22if (match.Index + match.Length >= span.Length) 28content = span[(match.Index + match.Length)..];
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
222if (match.Groups[4].Length > 0)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
222if (match.Groups[4].Length > 0)
Microsoft.Build (2)
Evaluation\Expander.cs (2)
1083if (itemMetadataMatch.Groups[RegularExpressions.ItemSpecificationGroup].Length > 0) 3055ProjectErrorUtilities.VerifyThrowInvalidProject(match.Groups[RegularExpressions.ItemSpecificationGroup].Length == 0, _elementLocation, "QualifiedMetadataInTransformNotAllowed", match.Value, name);
Microsoft.Build.Engine.UnitTests (10)
Evaluation\ExpressionShredder_Tests.cs (2)
623Assert.Equal(0, transformGroup.Length); 1176if (embeddedMetadataReference.Groups["ITEM_SPECIFICATION"].Length > 0)
FileUtilitiesRegex_Tests.cs (8)
201match.Length.ShouldBe(13); 205match.Length.ShouldBe(13); 267match.Length.ShouldBe(13); 271match.Length.ShouldBe(13); 322match.Length.ShouldBe(9); 326match.Length.ShouldBe(9); 387match.Length.ShouldBe(9); 391match.Length.ShouldBe(9);
Microsoft.Build.Tasks.UnitTests (1)
ResourceHandling\GenerateResource_Tests.cs (1)
3781i = match.Index + match.Length;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Synthesized\GeneratedNameParser.cs (1)
217if (s_fileTypeOrdinalPattern.Match(generatedName) is Match { Success: true, Groups: var groups, Index: var index, Length: var length })
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (1)
src\Compilers\CSharp\Portable\Symbols\Synthesized\GeneratedNameParser.cs (1)
217if (s_fileTypeOrdinalPattern.Match(generatedName) is Match { Success: true, Groups: var groups, Index: var index, Length: var length })
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\CSharp\Portable\Symbols\Synthesized\GeneratedNameParser.cs (1)
217if (s_fileTypeOrdinalPattern.Match(generatedName) is Match { Success: true, Groups: var groups, Index: var index, Length: var length })
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\SourceMarkers.cs (4)
35=> s_tags.Replace(source, m => new string(' ', m.Length)); 69tagMap.Add(id, (match.Index + match.Length, -1)); 103result.Add((id, new TextSpan(span.Index, span.Length))); 129var regionText = plainSource.AsSpan().Slice(exceptionRegion.Index, exceptionRegion.Length);
Microsoft.CodeAnalysis.Test.Utilities (4)
Diagnostics\DiagnosticsHelper.cs (1)
22return new TextSpan(match.Index, match.Length);
MarkedSource\SourceWithMarkedNodes.cs (3)
66yield return new MarkedSpan(new TextSpan(absoluteOffset, markedSyntax.Length), new TextSpan(match.Index, match.Length), tagName.Value, parsedKind, id, parentId); 82return s_tags.Replace(source, m => new string(' ', m.Length));
Microsoft.CodeAnalysis.Workspaces (1)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
421Debug.Assert(renameText.Length == match.Length);
Microsoft.Data.Analysis (3)
TextFieldParser.cs (3)
103_delimiterLength += delimiterMatch.Length; 795index = matchResult.Index + matchResult.Length; 862index = delimiterMatch.Index + delimiterMatch.Length;
Microsoft.Data.Analysis.Tests (3)
src\Microsoft.Data.Analysis\TextFieldParser.cs (3)
103_delimiterLength += delimiterMatch.Length; 795index = matchResult.Index + matchResult.Length; 862index = delimiterMatch.Index + delimiterMatch.Length;
Microsoft.DotNet.VersionTools (1)
Dependencies\FileRegexUpdater.cs (1)
81.Remove(startIndex, group.Length)
Microsoft.DotNet.VersionTools.Tasks (1)
UpdateToRemoteDependencies.cs (1)
114.Remove(g.Index, g.Length)
Microsoft.ML.Tokenizers (1)
PreTokenizer\PreTokenizer.cs (1)
169match = (m.Index, m.Length);
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (3)
911Index = MatchResult.Index + MatchResult.Length 980Index = DelimiterMatch.Index + DelimiterMatch.Length 1665m_DelimiterLength += DelimiterMatch.Length
System.Data.Common (2)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
444if (!match.Success || (match.Length != connectionString.Length)) 446throw ADP.ConnectionStringSyntax(match.Length);
System.Data.Odbc (2)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
444if (!match.Success || (match.Length != connectionString.Length)) 446throw ADP.ConnectionStringSyntax(match.Length);
System.Text.RegularExpressions (18)
System\Text\RegularExpressions\Capture.cs (4)
30public string Value => Text is string text ? text.Substring(Index, Length) : string.Empty; 34public ReadOnlySpan<char> ValueSpan => Text is string text ? text.AsSpan(Index, Length) : []; 43internal ReadOnlyMemory<char> GetRightSubstring() => Text is string text ? text.AsMemory(Index + Length, Text.Length - Index - Length) : ReadOnlyMemory<char>.Empty;
System\Text\RegularExpressions\Match.cs (1)
103r.RunSingleMatch(RegexRunnerMode.FullMatchRequired, Length, Text, _textbeg, _textend - _textbeg, _textpos)! :
System\Text\RegularExpressions\MatchCollection.cs (1)
100_prevlen = match.Length;
System\Text\RegularExpressions\Regex.cs (2)
509return (true, match.Index, match.Length, match._textpos); 575if (match.Length == 0)
System\Text\RegularExpressions\Regex.Replace.cs (3)
182state.prevat = match.Index + match.Length; 200state.segments.Add(state.input.AsMemory(match.Index + match.Length, state.prevat - match.Index - match.Length));
System\Text\RegularExpressions\Regex.Split.cs (3)
96state.prevat = match.Index + match.Length; 123state.results.Add(state.input.Substring(match.Index + match.Length, state.prevat - match.Index - match.Length));
System\Text\RegularExpressions\RegexReplacement.cs (4)
242state.prevat = match.Index + match.Length; 305state.prevat = match.Index + match.Length; 324state.segments.Add(state.inputMemory.Slice(match.Index + match.Length, state.prevat - match.Index - match.Length));