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