3 writes to
Microsoft.NET.StringTools (2)
InternableString.cs (2)
52return ref _string._inlineSpan[_charIndex]; 55return ref span.Span[_charIndex];
System.Private.CoreLib (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
269get => ref _span[_index];
4701 references to
aspire (16)
Mcp\Docs\DocsIndexService.cs (2)
549var startOk = index == 0 || !char.IsLetterOrDigit(text[index - 1]); 551var endOk = endIndex >= text.Length || !char.IsLetterOrDigit(text[endIndex]);
Mcp\Docs\LlmsTxtParser.cs (9)
220while (hashCount < trimmed.Length && trimmed[hashCount] is '#') 232if (textStart < trimmed.Length && trimmed[textStart] is ' ') 251while (lineStart < content.Length && content[lineStart] is ' ' or '\t') 257if (lineStart < content.Length && content[lineStart] is '>') 283if (position < content.Length && content[position] is '#') 484while (whitespaceSkipped < remaining.Length && remaining[whitespaceSkipped] is ' ' or '\t') 498while (level < trimmed.Length && trimmed[level] is '#') 504if (level >= trimmed.Length || trimmed[level] is not ' ') 586if (absoluteIndex + 2 < span.Length && span[absoluteIndex + 2] is '#')
src\Shared\ConsoleLogs\AnsiParser.cs (5)
309if (span[i] == ParametersSeparatorChar || i == paramsEndPosition) 329finalByte = span[paramsEndPosition]; 401if (urlEndEscapePosition < 0 || span.Length < urlEndEscapePosition + 1 || span[urlEndEscapePosition + 1] != '\\') 409while (linkEndEscapePosition != -1 && span.Length > (linkEndEscapePosition + 2) && span[linkEndEscapePosition + 1] != ']') 415if (linkEndEscapePosition < 0 || span.Length < linkEndEscapePosition + 2 || span[linkEndEscapePosition + 2] != '8')
Aspire.Cli.Tests (1)
Utils\CliTestHelper.cs (1)
657var lineEnd = nlIndex > 0 && remaining[nlIndex - 1] == '\r' ? nlIndex - 1 : nlIndex;
Aspire.Dashboard (7)
Extensions\StringExtensions.cs (1)
59return $"{char.ToUpperInvariant(s[0])}{char.ToUpperInvariant(s[lastSpaceIndex + 1])}";
Otlp\Model\OtlpHelpers.cs (1)
84ToCharsBuffer(data[pos], chars, pos * 2);
src\Shared\ConsoleLogs\AnsiParser.cs (5)
309if (span[i] == ParametersSeparatorChar || i == paramsEndPosition) 329finalByte = span[paramsEndPosition]; 401if (urlEndEscapePosition < 0 || span.Length < urlEndEscapePosition + 1 || span[urlEndEscapePosition + 1] != '\\') 409while (linkEndEscapePosition != -1 && span.Length > (linkEndEscapePosition + 2) && span[linkEndEscapePosition + 1] != ']') 415if (linkEndEscapePosition < 0 || span.Length < linkEndEscapePosition + 2 || span[linkEndEscapePosition + 2] != '8')
Aspire.Hosting (1)
VolumeNameGenerator.cs (1)
46var c = nameSpan[i];
Aspire.Hosting.Docker (18)
EnvVarEscaper.cs (18)
70if (input[i] == '$' && (i == 0 || input[i - 1] != '$')) 76result.Append(input[i]); 87if (input[i] == '$' && (i == 0 || input[i - 1] != '$')) 123while (varLength < remaining.Length && (char.IsLetterOrDigit(remaining[varLength]) || remaining[varLength] == '_' || remaining[varLength] == '-')) 171if (remaining[i] == '$' && i + 1 < remaining.Length && remaining[i + 1] == '{') 173if (i == 0 || remaining[i - 1] != '$') 179else if (remaining[i] == '}') 301if (content[i] == '$' && i + 1 < content.Length && content[i + 1] == '{') 303if (i == 0 || content[i - 1] != '$') 309else if (content[i] == '}') 316else if (depth == 0 && content[i] == ':' && i + 1 < content.Length && content[i + 1] == '-')
dotnet (2)
_generated\187\RegexGenerator.g.cs (2)
295while ((uint)iteration2 < (uint)slice.Length && char.IsDigit(slice[iteration2])) 404if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
dotnet-dev-certs (2)
_generated\10\RegexGenerator.g.cs (2)
175while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 577if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
GenerateDocumentationAndConfigFiles (23)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
ILAssembler (10)
GrammarVisitor.cs (2)
3107BinaryPrimitives.ReverseEndianness(bytesAsChars[i]); 3317int digitValue = value[i] - '0';
StringHelpers.cs (7)
46char c = content[i]; 50char next = content[i + 1]; 103IsOctalDigit(content[i + 2]) && 104IsOctalDigit(content[i + 3])) 107(content[i + 2] - '0') * 8 + 108(content[i + 3] - '0'); 128while (i < content.Length && char.IsWhiteSpace(content[i]))
VTableFixupSupport.cs (1)
163builder.WriteInt32(slotDataRvas[i]); // RVA
ILCompiler.Compiler (17)
src\runtime\src\coreclr\tools\Common\Compiler\Dataflow\TypeExtensions.cs (1)
36if (name[name.Length - metadataTypeName.Length - 1] != '.')
src\runtime\src\coreclr\tools\Common\Compiler\NativeAotNameMangler.cs (2)
50byte c = s[i]; 84while ((i + 1 < s.Length) && ((s[i + 1] & 0b1100_0000) == 0b1000_0000))
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\Dwarf\DwarfHelper.cs (2)
116@byte = buffer[pos++]; 135@byte = buffer[pos++];
src\runtime\src\coreclr\tools\Common\Internal\Text\Utf8StringBuilder.cs (1)
75_buffer[_length++] = (byte)value[i];
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\ILReader.cs (3)
39return _ilBytes[_currentOffset++]; 105ILOpcode opcode = (ILOpcode)_ilBytes[_currentOffset]; 110opcode = (ILOpcode)(0x100 + _ilBytes[_currentOffset + 1]);
src\runtime\src\libraries\Common\src\Internal\VersionResilientHashCode.cs (4)
45_hash1 = unchecked(_hash1 + RotateLeft(_hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 48_hash2 = unchecked(_hash2 + RotateLeft(_hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]); 87hash1 = unchecked(hash1 + RotateLeft(hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 90hash2 = unchecked(hash2 + RotateLeft(hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]);
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\CompilerGeneratedNames.cs (4)
66return typeName.Length > i + 1 && typeName[i + 1] == 'd'; 92return fieldName.Length > i + 1 && fieldName[i + 1] == '2'; 130return methodName.Length > i + 1 && methodName[i + 1] == 'b'; 161return methodName.Length > i + 1 && methodName[i + 1] == 'g';
ILCompiler.ReadyToRun (18)
Compiler\DependencyAnalysis\ReadyToRun\WasmImportThunk.cs (2)
236WasmValueType type = _typeNode.Type.Params.Types[wasmLocalIndex]; 338WasmValueType type = _typeNode.Type.Params.Types[wasmLocalIndex];
Compiler\DependencyAnalysis\ReadyToRun\WasmInterpreterToR2RThunkNode.cs (1)
196WasmValueType wasmType = targetFuncType.Params.Types[targetParamIndex];
Compiler\DependencyAnalysis\ReadyToRun\WasmR2RToInterpreterThunkNode.cs (1)
229WasmValueType type = _typeNode.Type.Params.Types[wasmLocalIndex];
src\runtime\src\coreclr\tools\Common\Compiler\Dataflow\TypeExtensions.cs (1)
36if (name[name.Length - metadataTypeName.Length - 1] != '.')
src\runtime\src\coreclr\tools\Common\Compiler\NativeAotNameMangler.cs (2)
50byte c = s[i]; 84while ((i + 1 < s.Length) && ((s[i + 1] & 0b1100_0000) == 0b1000_0000))
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\Dwarf\DwarfHelper.cs (2)
116@byte = buffer[pos++]; 135@byte = buffer[pos++];
src\runtime\src\coreclr\tools\Common\Internal\Text\Utf8StringBuilder.cs (1)
75_buffer[_length++] = (byte)value[i];
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
3670if (bools[i])
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\ILReader.cs (3)
39return _ilBytes[_currentOffset++]; 105ILOpcode opcode = (ILOpcode)_ilBytes[_currentOffset]; 110opcode = (ILOpcode)(0x100 + _ilBytes[_currentOffset + 1]);
src\runtime\src\libraries\Common\src\Internal\VersionResilientHashCode.cs (4)
45_hash1 = unchecked(_hash1 + RotateLeft(_hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 48_hash2 = unchecked(_hash2 + RotateLeft(_hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]); 87hash1 = unchecked(hash1 + RotateLeft(hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 90hash2 = unchecked(hash2 + RotateLeft(hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]);
ILCompiler.RyuJit (4)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
3670if (bools[i])
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\ILReader.cs (3)
39return _ilBytes[_currentOffset++]; 105ILOpcode opcode = (ILOpcode)_ilBytes[_currentOffset]; 110opcode = (ILOpcode)(0x100 + _ilBytes[_currentOffset + 1]);
ILCompiler.TypeSystem (9)
src\runtime\src\coreclr\tools\Common\Internal\Text\Utf8Span.cs (1)
38int ch = _value[i];
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\MetadataExtensions.cs (1)
340if (otherSpan[i] != *(currentChar++))
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\ILReader.cs (3)
39return _ilBytes[_currentOffset++]; 105ILOpcode opcode = (ILOpcode)_ilBytes[_currentOffset]; 110opcode = (ILOpcode)(0x100 + _ilBytes[_currentOffset + 1]);
src\runtime\src\libraries\Common\src\Internal\VersionResilientHashCode.cs (4)
45_hash1 = unchecked(_hash1 + RotateLeft(_hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 48_hash2 = unchecked(_hash2 + RotateLeft(_hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]); 87hash1 = unchecked(hash1 + RotateLeft(hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 90hash2 = unchecked(hash2 + RotateLeft(hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]);
illink (8)
ILLink.RoslynAnalyzer (23)
src\runtime\src\libraries\Common\src\System\Buffers\SearchValuesPolyfills.cs (2)
102if (Contains(span[i])) 115if (!Contains(span[i]))
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
349ch = _input[_index++];
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (8)
43if (input[offset] == EscapeCharacter) // this is very rare (IL Emit or pure IL) 48isNestedType = offset > 0 && offset < input.Length && input[offset] == '+'; 56char c = input[offset]; 62!s_endOfFullTypeNameDelimiterChars.Contains(input[offset])) // invalid name, escapes a char that does not need escaping 82if (index > 0 && fullName[index - 1] == '.') 136if (offset > 0 && input[offset - 1] == EscapeCharacter) // this should be very rare (IL Emit & pure IL) 148if (input[offset] is ']') 150if (input[offset - 1] != EscapeCharacter)
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\CompilerGeneratedNames.cs (4)
66return typeName.Length > i + 1 && typeName[i + 1] == 'd'; 92return fieldName.Length > i + 1 && fieldName[i + 1] == '2'; 130return methodName.Length > i + 1 && methodName[i + 1] == 'b'; 161return methodName.Length > i + 1 && methodName[i + 1] == 'g';
Microsoft.AspNetCore.Antiforgery (3)
src\aspnetcore\src\Shared\Encoding\Int7BitEncodingUtils.cs (1)
77b = source[index++];
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.AspNetCore.Authentication.Cookies (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
87if (char.IsControl(readOnlySpan[i]))
Microsoft.AspNetCore.Authentication.Negotiate (2)
_generated\1\RegexGenerator.g.cs (2)
128if ((uint)(pos - 1) >= inputSpan.Length || inputSpan[pos - 1] != '\\') 135if ((uint)(pos - 1) >= inputSpan.Length || inputSpan[pos - 1] == '\\')
Microsoft.AspNetCore.Authorization (1)
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
Microsoft.AspNetCore.Components (5)
_generated\1\RegexGenerator.g.cs (1)
121if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
src\aspnetcore\src\Http\Routing\src\Constraints\FileNameRouteConstraint.cs (1)
145if (value[i] != '.')
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (3)
558if (buffer[tempIdx] != '%') 595int value = buffer[tempIdx]; 603return (uint)c >= (uint)CharToHexLookup.Length ? -1 : CharToHexLookup[c];
Microsoft.AspNetCore.Components.Endpoints (7)
FormMapping\FormDataReader.cs (1)
129if (key.Span[prefix.Length] != '[')
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (6)
47ref readonly var frame = ref frames[position]; 68while (position < subtreeEnd && frames[position].FrameType is RenderTreeFrameType.Attribute) 70ref readonly var attrFrame = ref frames[position]; 117while (position < subtreeEnd && frames[position].FrameType is RenderTreeFrameType.Attribute) 119ref readonly var attrFrame = ref frames[position]; 130ref readonly var inner = ref frames[position];
Microsoft.AspNetCore.Components.Server (9)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (6)
47ref readonly var frame = ref frames[position]; 68while (position < subtreeEnd && frames[position].FrameType is RenderTreeFrameType.Attribute) 70ref readonly var attrFrame = ref frames[position]; 117while (position < subtreeEnd && frames[position].FrameType is RenderTreeFrameType.Attribute) 119ref readonly var attrFrame = ref frames[position]; 130ref readonly var inner = ref frames[position];
src\aspnetcore\src\SignalR\common\Shared\BinaryMessageParser.cs (1)
42byteRead = span[numBytes];
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequenceReader.cs (2)
188value = this.CurrentSpan[this.CurrentSpanIndex]; 212value = this.CurrentSpan[this.CurrentSpanIndex];
Microsoft.AspNetCore.Components.Web (1)
Routing\NavLink.cs (1)
219if (hrefAbsolute[hrefAbsolute.Length - 1] == '/' &&
Microsoft.AspNetCore.Components.WebAssembly (6)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (6)
47ref readonly var frame = ref frames[position]; 68while (position < subtreeEnd && frames[position].FrameType is RenderTreeFrameType.Attribute) 70ref readonly var attrFrame = ref frames[position]; 117while (position < subtreeEnd && frames[position].FrameType is RenderTreeFrameType.Attribute) 119ref readonly var attrFrame = ref frames[position]; 130ref readonly var inner = ref frames[position];
Microsoft.AspNetCore.Cors (1)
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
Microsoft.AspNetCore.DataProtection (1)
src\aspnetcore\src\Shared\Encoding\Int7BitEncodingUtils.cs (1)
77b = source[index++];
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
_generated\0\RegexGenerator.g.cs (2)
175while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 577if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Latency\AcceptanceTests.cs (1)
88if (isMatch(span[i]))
Microsoft.AspNetCore.Http.Abstractions (4)
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (3)
558if (buffer[tempIdx] != '%') 595int value = buffer[tempIdx]; 603return (uint)c >= (uint)CharToHexLookup.Length ? -1 : CharToHexLookup[c];
Microsoft.AspNetCore.Http.Connections (3)
ServerSentEventsMessageFormatter.cs (1)
88if (memory.Span[memory.Length - 1] == '\r')
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.AspNetCore.Http.Extensions (1)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
129if (key.Span[prefix.Length] != '[')
Microsoft.AspNetCore.Http.Results (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
87if (char.IsControl(readOnlySpan[i]))
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
457host[hostEndIdx] != ']' || // We found an invalid host character
Microsoft.AspNetCore.Identity (1)
Passkeys\AuthenticatorData.cs (1)
110var flags = (AuthenticatorDataFlags)bytes.Span[offset];
Microsoft.AspNetCore.Mvc.Core (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
87if (char.IsControl(readOnlySpan[i]))
Microsoft.AspNetCore.Razor.Utilities.Shared (3)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\SpanExtensions.cs (1)
114_current = _span[_index];
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Utilities\SortHelper`1.cs (2)
86var currentKey = keySelector(items[i]); 115var currentKey = (T)(object)items[i]!;
Microsoft.AspNetCore.Routing (7)
_generated\1\RegexGenerator.g.cs (1)
121if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Constraints\FileNameRouteConstraint.cs (1)
145if (value[i] != '.')
Matching\DfaMatcher.cs (4)
220destination = states[destination].PathTransitions.GetDestination(path, segments[i]); 246var segment = segments[segmentIndex]; 268var segment = segments[segmentIndex]; 285var segment = segments[segmentIndex];
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
Microsoft.AspNetCore.Server.HttpSys (7)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
197if (index < timestamps.Length && timestamps[index] > 0) 199timestamp = timestamps[index];
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
283var header = HeaderKeys[i]; 297var header = HeaderKeys[i];
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (2)
268if (buffer[scan++] != '%') 313var value = buffer[scan++];
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
Microsoft.AspNetCore.Server.IIS (7)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
197if (index < timestamps.Length && timestamps[index] > 0) 199timestamp = timestamps[index];
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
283var header = HeaderKeys[i]; 297var header = HeaderKeys[i];
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (2)
268if (buffer[scan++] != '%') 313var value = buffer[scan++];
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
Microsoft.AspNetCore.Server.Kestrel.Core (59)
_generated\1\RegexGenerator.g.cs (2)
176while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 580if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Internal\Http\HttpHeaders.cs (4)
362c = value[offset]; 442c = value[offset]; 549c = values[offset]; 603c = values[offset];
Internal\Http\HttpParser.cs (17)
176if (memory.Span[index] == ByteCR) 193if (memory.Span[index] == ByteCR) 277var expectedColon = headerLine[nameEnd]; 295var ch = headerLine[valueStart]; 304ch = headerLine[valueStart]; 312ch = headerLine[valueStart]; 329var ch = headerLine[valueEnd]; 337ch = headerLine[valueEnd]; 452var ch = requestLine[offset]; 469if (requestLine[offset + index] == BytePercentage) 478ch = requestLine[offset]; 489ch = requestLine[offset]; 501while ((uint)offset < (uint)requestLine.Length && requestLine[offset] == ByteSpace) 510if ((uint)offset + 9 != (uint)requestLine.Length || requestLine[offset + 8] != ByteCR) 554if (invalidIndex <= 0 || span[invalidIndex] != ByteSpace) 613if (span[lfOrCrIndex] == ByteCR) 622if ((uint)span.Length > (uint)(crIndex + 1) && span[crIndex + 1] == ByteLF)
Internal\Http2\Http2Connection.cs (2)
645if (requestLine.Length > 10 && requestLine[requestLine.Length - 1] == (byte)'\r') 1706if (((uint)name[i] - 65) <= (90 - 65))
Internal\Http2\Http2Stream.cs (1)
443var ch = pathSegment[i];
Internal\Http3\Http3Stream.cs (2)
390if (((uint)name[i] - 65) <= (90 - 65)) 1221var ch = pathSegment[i];
Internal\Http3\QPack\DecoderStreamReader.cs (1)
60OnByte(span[i]);
Internal\Http3\QPack\EncoderStreamReader.cs (1)
107OnByte(span[i]);
Internal\Infrastructure\HttpUtilities.cs (3)
183var ch = span[i]; 332return (uint)str.Length + associatedValues[c]; 383if (span.Length > sizeof(ulong) && span[sizeof(ulong)] == (byte)'\r')
Middleware\Internal\LoggingStream.cs (2)
176builder.Append(CultureInfo.InvariantCulture, $"{buffer[i]:X2}"); 179var bufferChar = (char)buffer[i];
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 648if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
src\aspnetcore\src\Shared\runtime\Http2\Hpack\Huffman.cs (5)
540return (EncodingTableCodes[data], EncodingTableBitLengths[data]); 584uint code = encodingTableCodes[octet]; 585int bitLength = encodingTableBitLengths[octet]; 696acc |= src[i++];
src\aspnetcore\src\Shared\runtime\Http3\QPack\QPackDecoder.cs (5)
344byte b = data[currentIndex++]; 430byte b = data[currentIndex++]; 536byte b = data[currentIndex++]; 565byte b = data[currentIndex++]; 697if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\aspnetcore\src\Shared\runtime\Http3\QPack\QPackEncoder.cs (2)
271value = values[i]; 286written = valueEncoding.GetBytes(values[i], buffer);
src\aspnetcore\src\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (3)
558if (buffer[tempIdx] != '%') 595int value = buffer[tempIdx]; 603return (uint)c >= (uint)CharToHexLookup.Length ? -1 : CharToHexLookup[c];
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\aspnetcore\src\SignalR\common\Shared\BinaryMessageParser.cs (1)
42byteRead = span[numBytes];
Microsoft.AspNetCore.WebUtilities (6)
MultipartReaderStream.cs (1)
353if (matchBytes[matchCount] != segment1.Array![matchOffset + matchCount])
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (3)
558if (buffer[tempIdx] != '%') 595int value = buffer[tempIdx]; 603return (uint)c >= (uint)CharToHexLookup.Length ? -1 : CharToHexLookup[c];
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.Build (76)
_generated\0\RegexGenerator.g.cs (55)
964while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 1046while ((uint)iteration1 < (uint)slice.Length && char.IsDigit(slice[iteration1])) 1323if ((uint)lazyloop_pos >= (uint)slice.Length || slice[lazyloop_pos] == ':') 1472while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 1605while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6])) 1672if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 1792while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 2158while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration])) 2296while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 2327if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2448if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2603if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2758if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2942if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 3155if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 3269while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 3436while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 3571if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 3694while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 3734while ((uint)iteration1 < (uint)slice.Length && ((ch = slice[iteration1]) < 128 ? ("\0\0怀Ͽ\ufffe蟿\ufffe߿"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\0\u0004\n-/_`\0\u0002\u0004\u0005\u0003\u0001\u0006\t\u0013\0"))) 3783while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 3805while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 3880while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 4015if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 4550while ((uint)iteration < (uint)slice.Length && Utilities.IsWordChar(slice[iteration])) 5169while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 5251while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 5269while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 5333while ((uint)iteration5 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration5])) 5351while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6])) 5417while ((uint)iteration8 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration8])) 5549while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 5602while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 5620while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 5667while ((uint)iteration5 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration5])) 5685while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6])) 5743while ((uint)iteration8 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration8])) 5850while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 5868while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 5933while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 5962if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 6138while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 6156while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 6233while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 6251while ((uint)iteration5 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration5])) 6328while ((uint)iteration7 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration7])) 6346while ((uint)iteration8 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration8])) 6587while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 6609while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 6689if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 6813while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration])) 6840while ((uint)iteration1 < (uint)slice.Length && char.IsDigit(slice[iteration1])) 6859if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 6991while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 7028(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 :
Evaluation\ConditionEvaluator.cs (3)
113input[beginning] != '$' || 114input[beginning + 1] != '(' || 115input[beginning + length - 1] != ')' ||
Evaluation\Expander.cs (9)
501char character = expression[index]; 632if ((n < argumentsContentLength - 1) && (argumentsSpan[n] == '$' && argumentsSpan[n + 1] == '(')) 648else if (argumentsSpan[n] == '`' || argumentsSpan[n] == '"' || argumentsSpan[n] == '\'') 653n = ScanForClosingQuote(argumentsSpan[quoteStart], argumentsSpan, n); 663else if (argumentsSpan[n] == ',') 675if (argumentsSpan[i] == ',')
Evaluation\Expander.Function.cs (2)
251if (expressionRoot.Length > methodStartIndex + 2 && expressionRoot[methodStartIndex] == ':' && expressionRoot[methodStartIndex + 1] == ':')
Logging\OptimizedStringIndenter.cs (2)
126if (input[i] == '\n') 154if (index > 0 && input[index - 1] == '\r')
Logging\TerminalLogger\TerminalLogger.cs (4)
956&& (outputPathSpan[workingDirectorySpan.Length] == Path.DirectorySeparatorChar 957|| outputPathSpan[workingDirectorySpan.Length] == Path.AltDirectorySeparatorChar)) 970&& (outputPathSpan[sourceRootSpan.Length - 1] == Path.DirectorySeparatorChar 971|| outputPathSpan[sourceRootSpan.Length - 1] == Path.AltDirectorySeparatorChar))
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Extensions\ImmutableArrayExtensions.cs (1)
1330int comparison = comparer(array[middle], value);
Microsoft.Build.Framework (5)
_generated\1\RegexGenerator.g.cs (1)
190if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Coordinator\CoordinatorSettings.cs (1)
176byte b = hash[i];
EscapingUtilities.cs (1)
250char ch = source[specialCharIndex];
Utilities\FileMatcher.cs (1)
1724char inputChar = input[iIndex];
Utilities\HexConverter.cs (1)
16=> c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c];
Microsoft.Build.Tasks.CodeAnalysis (7)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\CommandLineUtilities.cs (7)
69while (i < commandLine.Length && char.IsWhiteSpace(commandLine[i])) 79if (commandLine[i] == '#' && removeHashComments) 86while (i < commandLine.Length && (!char.IsWhiteSpace(commandLine[i]) || (quoteCount % 2 != 0))) 88var current = commandLine[i]; 96builder.Append(commandLine[i]); 99} while (i < commandLine.Length && commandLine[i] == '\\'); 102if (i >= commandLine.Length || commandLine[i] != '"')
Microsoft.Build.Tasks.Core (24)
_generated\0\RegexGenerator.g.cs (24)
582while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 664while ((uint)iteration1 < (uint)slice.Length && char.IsDigit(slice[iteration1])) 941if ((uint)lazyloop_pos >= (uint)slice.Length || slice[lazyloop_pos] == ':') 1090while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 1223while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6])) 1290if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 1410while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 1776while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration])) 1914while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 1945if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2066if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2221if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2376if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2560if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2773if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2881while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration])) 2902if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 3027while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 3878while ((uint)iteration < (uint)slice.Length && ((ch = slice[iteration]) < 128 ? ("\0\0䀀Ͽ\0\0\0\0"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\0\u0002\u0001./\t"))) 3948if (((ch = repeaterSlice[i]) < 128 ? !char.IsAsciiHexDigit(ch) : !RegexRunner.CharInClass((char)ch, "\0\u0004\u0001AGag\t"))) 3962if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 4098while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 4173if (char.IsAscii(span[i])) 4180if (char.IsDigit(span[i]))
Microsoft.Build.Tasks.Git (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.Build.Utilities.Core (15)
_generated\0\RegexGenerator.g.cs (15)
423while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 505while ((uint)iteration1 < (uint)slice.Length && char.IsDigit(slice[iteration1])) 782if ((uint)lazyloop_pos >= (uint)slice.Length || slice[lazyloop_pos] == ':') 931while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 1064while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6])) 1131if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 1251while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 1617while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration])) 1755while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 1786if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 1907if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2062if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2217if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2401if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 2614if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Microsoft.CodeAnalysis (52)
_generated\0\RegexGenerator.g.cs (9)
170while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 337while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 472if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 595while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 635while ((uint)iteration1 < (uint)slice.Length && ((ch = slice[iteration1]) < 128 ? ("\0\0怀Ͽ\ufffe蟿\ufffe߿"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\0\u0004\n-/_`\0\u0002\u0004\u0005\u0003\u0001\u0006\t\u0013\0"))) 684while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 706while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 781while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 916if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
CaseInsensitiveComparison.cs (4)
130int ordDiff = CompareLowerUnicode(str1[i], str2[i]); 183if (!AreEqualLowerUnicode(str1[i], str2[i]))
CommandLine\CommandLineParser.cs (8)
109char ch = value[i]; 959var cur = arg[i]; 985while (i < arg.Length && arg[i] == '\\') 991if (i < arg.Length && arg[i] == '"') 1036while (end > 0 && span[end - 1] == '"') 1041while (start < end && span[start] == '"') 1048if (span[i] == '"') 1093var c = span[i];
FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
InternalUtilities\CommandLineUtilities.cs (7)
69while (i < commandLine.Length && char.IsWhiteSpace(commandLine[i])) 79if (commandLine[i] == '#' && removeHashComments) 86while (i < commandLine.Length && (!char.IsWhiteSpace(commandLine[i]) || (quoteCount % 2 != 0))) 88var current = commandLine[i]; 96builder.Append(commandLine[i]); 99} while (i < commandLine.Length && commandLine[i] == '\\'); 102if (i >= commandLine.Length || commandLine[i] != '"')
InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
MemoryExtensions.cs (3)
17if (span[i] == target) 30var c = span[i]; 96if (span.Length > 1 && span[0] == '"' && span[span.Length - 1] == '"')
MetadataReader\MetadataHelpers.cs (2)
517if (emittedTypeName[indexOfManglingChar - 1] == GenericTypeNameManglingChar) 651if (nameSpan[i] == DotDelimiter)
PEWriter\InstructionOperandTypes.cs (2)
18return (OperandType)TwoByte[il[position++]]; 22return (OperandType)OneByte[operation];
SourceGeneration\CompilationCache.cs (2)
165if (!ReferenceEquals(aSpan[i], bSpan[i]))
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
Symbols\CommonGeneratedNameParser.cs (1)
34var c = (i >= 0) ? metadataNameSuffix[i] : '\0';
Syntax\SeparatedSyntaxList.cs (1)
37builder.Add(nodes[i]);
Syntax\SyntaxList`1.cs (1)
39copy[i].Value = nodes[i].Green;
Syntax\SyntaxNodeOrTokenList.cs (1)
95copy[i].Value = nodesAndTokens[i].UnderlyingNode!;
Syntax\SyntaxTokenList.cs (1)
86copy[i].Value = tokens[i].Node!;
Syntax\SyntaxTriviaList.cs (1)
92copy[i].Value = trivias[i].UnderlyingNode!;
Microsoft.CodeAnalysis.Analyzers (27)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
125if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 147if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
Microsoft.CodeAnalysis.AnalyzerUtilities (27)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
125if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 147if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
Microsoft.CodeAnalysis.CodeStyle (25)
src\roslyn\src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
68Debug.Assert(customTags[i] == tags[i]);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
366_formatArguments[i] = $"{formatArguments[i]}";
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
Microsoft.CodeAnalysis.CSharp (16)
CommandLine\CSharpCommandLineParser.cs (2)
1804if (valueSpan[index] is ';' or ',') 1957if (eqlOrQuote >= 0 && valueSpan[eqlOrQuote] == '=')
Lowering\ExtensionMethodBodyRewriter.cs (1)
63builder.Add(parameter, rewrittenParameters[parameter.Ordinal]);
Parser\LanguageParser_InterpolatedString.cs (7)
244Debug.Assert(closeQuoteText[afterWhitespace] == '"'); 301var isBlankLine = (currentIndex == text.Length && isLast) || (currentIndex < text.Length && SyntaxFacts.IsNewLine(text[currentIndex])); 427var currentLineChar = currentLineWhitespace[i]; 428var indentationLineChar = indentationLineWhitespace[i]; 452while (currentIndex < text.Length && SyntaxFacts.IsWhitespace(text[currentIndex])) 462var ch = text[currentIndex]; 469currentIndex += SlidingTextWindow.GetNewLineWidth(ch, currentIndex + 1 < text.Length ? text[currentIndex + 1] : '\0');
Parser\Lexer.cs (1)
1339switch (textWindowCharSpan[currentIndex])
Parser\QuickScanner.cs (2)
211char c = textWindowCharSpan[currentIndex]; 214var flags = uc < charPropLength ? (CharFlags)CharProperties[uc] : CharFlags.Complex;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
566ParamInfo<TypeSymbol> param = parameterTypes[i];
Symbols\MemberSignatureComparer.cs (2)
746if (!HaveSameParameterType(params1[i], typeMap1, params2[i], typeMap2, refKindCompareMode, considerDefaultValues, typeComparison))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
312var name = IdentifierName(names[i]);
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\FileBasedPrograms\AbstractAppDirectiveCompletionProvider.cs (1)
95if (!char.IsWhiteSpace(span[i]))
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Usage\CSharpMissingShebangInFileBasedProgram.cs (1)
77(content.Length == directiveName.Length || char.IsWhiteSpace(content[directiveName.Length]));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\Worker_Preprocesser.cs (3)
360while (nameStart < contentText.Length && (contentText[nameStart] == ' ' || contentText[nameStart] == '\t')) 427if (contentText[index] != '.')
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
312var name = IdentifierName(names[i]);
Microsoft.CodeAnalysis.Extensions.Package (4)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
Microsoft.CodeAnalysis.Features (5)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (2)
105operations[current] is IConditionalOperation { WhenFalse: null } op && 134var nextStatement = operations[current];
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (1)
204return (asciiLookup[chDiv8] & (1 << (ch & 0x7))) != 0;
src\roslyn\src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
68Debug.Assert(customTags[i] == tags[i]);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
366_formatArguments[i] = $"{formatArguments[i]}";
Microsoft.CodeAnalysis.Razor.Compiler (32)
Language\CodeGeneration\CodeWriter.cs (5)
169return chars.Span[index]; 276span[newLineIndex - 1] == '\r' && 277span[newLineIndex] == '\n') 337return page.Value[chunkIndex].Span[charIndex]; 347return page.Value[chunkIndex].Span[charIndex];
Language\CodeGeneration\CodeWriterExtensions.cs (1)
937switch (literal.Span[index])
Language\CodeGeneration\IntermediateNodeWriter.cs (1)
336var lastCharBeforeSplit = literal.Span[maxStringLiteralLength - 1];
Language\Components\ComponentChildContentDiagnosticPass.cs (2)
64if (ancestors[i] is ComponentChildContentIntermediateNode { IsParameterized: true } ancestor && 66ancestors[i + 1] is ComponentIntermediateNode ancestorParentComponent)
Language\CSharpIdentifier.cs (2)
64var ch = inputName[i]; 78if (char.IsHighSurrogate(ch) && i + 1 < inputName.Length && char.IsLowSurrogate(inputName[i + 1]))
Language\DefaultRazorTagHelperContextDiscoveryPhase.cs (1)
608if (typeNamespace.Length > @namespace.Length && typeNamespace[@namespace.Length] != '.')
Language\HtmlConventions.cs (3)
94Debug.Assert(char.IsUpper(input[i])); 102var prev = input[i - 1]; 110(i + 1 < input.Length) && char.IsLower(input[i + 1]))
Language\Legacy\ParserHelpers.cs (1)
76var ch = span[i];
Language\Legacy\SourceLocationTracker.cs (2)
24nextCharacter = text[i + 1]; 27UpdateCharacterCore(text[i], nextCharacter, ref absoluteIndex, ref lineIndex, ref characterIndex);
Language\RazorHtmlWriter.cs (1)
248var charIsWhitespace = char.IsWhiteSpace(content.Span[i]);
Language\Syntax\InternalSyntax\SyntaxList.cs (4)
82Debug.Assert(nodes[i] != null); 83array[i].Value = nodes[i]; 96Debug.Assert(nodes[i] != null); 97array[i].Value = nodes[i];
Language\TagHelperCollection.cs (2)
269if (predicate(span[i], state)) 344if (predicate(span[i]))
Language\TagHelperCollection.Enumerator.cs (1)
31_current = _segment.Span[_index];
Language\TagHelperCollection.MultiSegmentCollection.cs (1)
72return _segments[segmentIndex].Span[localIndex];
Language\TagHelperCollection.SegmentBuilder.cs (1)
71if (_seenChecksums.Add(span[i].Checksum))
Language\TagHelperCollection.SingleSegmentCollection.cs (1)
49return _segment.Span[index];
SourceGenerators\RazorSourceGenerator.Helpers.cs (3)
33switch (filePath[i]) 35case '\\' or '/' when i + 1 < filePath.Length && filePath[i + 1] is '\\' or '/': 46builder.Append(filePath[i]);
Microsoft.CodeAnalysis.ResxSourceGenerator (27)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
125if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 147if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
Microsoft.CodeAnalysis.Workspaces (34)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
137if (docCommentId.Span[expectedDocCommentId.Length] != '.')
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (1)
179var node = sortedNodes.Span[i];
FindSymbols\TopLevelSyntaxTree\NavigateToSearchIndex.NavigateToSearchInfo.cs (6)
442if (!_containerCharSet.Contains(char.ToUpperInvariant(patternContainer[part.Start]))) 591return ContainsChar(humpSet, char.ToUpperInvariant(pattern[charParts[0].Start])); 597var c1 = char.ToUpperInvariant(pattern[charParts[i].Start]); 598var c2 = char.ToUpperInvariant(pattern[charParts[i + 1].Start]); 700var idx = FuzzyBigramCharIndex(char.ToLowerInvariant(pattern[i])) * FuzzyBigramAlphabetSize 701+ FuzzyBigramCharIndex(char.ToLowerInvariant(pattern[i + 1]));
FindSymbols\TopLevelSyntaxTree\SparseNgramGenerator.cs (2)
75var a = text[pos] * Mul1 + text[pos + 1] * Mul2;
Shared\Utilities\BloomFilter.cs (1)
237var c = key[index];
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1636return NameManager.GetPredefinedName(EK2NAME[ek - ExpressionKind.FirstOp]);
Microsoft.Data.Analysis (212)
Computations\Arithmetic.net8.cs (58)
115destination[i] = x[i] % y[i]; 123destination[i] = x[i] % y; 131destination[i] = x % y[i]; 141destination[i] = (x[i] == y[i]); 149destination[i] = (x[i] == y); 157destination[i] = (x[i] != y[i]); 165destination[i] = (x[i] != y); 173destination[i] = (x[i] >= y[i]); 181destination[i] = (x[i] >= y); 189destination[i] = (x[i] <= y[i]); 197destination[i] = (x[i] <= y); 205destination[i] = (x[i] > y[i]); 213destination[i] = (x[i] > y); 221destination[i] = (x[i] < y[i]); 229destination[i] = (x[i] < y); 473destination[i] = (x[i] == y[i]); 481destination[i] = (x[i] == y); 489destination[i] = (x[i] != y[i]); 497destination[i] = (x[i] != y); 505destination[i] = (x[i] >= y[i]); 513destination[i] = (x[i] >= y); 521destination[i] = (x[i] <= y[i]); 529destination[i] = (x[i] <= y); 537destination[i] = (x[i] > y[i]); 545destination[i] = (x[i] > y); 553destination[i] = (x[i] < y[i]); 561destination[i] = (x[i] < y); 574destination[i] = (bool)(x[i] & y[i]); 585destination[i] = (bool)(x[i] & y); 596destination[i] = (bool)(x & y[i]); 607destination[i] = (bool)(x[i] | y[i]); 618destination[i] = (bool)(x[i] | y); 629destination[i] = (bool)(x | y[i]); 640destination[i] = (bool)(x[i] ^ y[i]); 651destination[i] = (bool)(x[i] ^ y); 662destination[i] = (bool)(x ^ y[i]); 671destination[i] = (x[i] == y[i]); 679destination[i] = (x[i] == y); 687destination[i] = (x[i] != y[i]); 695destination[i] = (x[i] != y);
DataFrameColumn.cs (14)
612TKey pivot = span[sortIndices[middle]]; 621while (left < (hi - 1) && comparer.Compare(span[sortIndices[++left]], pivot) < 0) 624if (left == (hi - 1) && comparer.Compare(span[sortIndices[left]], pivot) < 0) 627while (right > lo && comparer.Compare(pivot, span[sortIndices[--right]]) < 0) 630if (right == lo && comparer.Compare(pivot, span[sortIndices[right]]) < 0) 687TKey d = span[di]; 694comparer.Compare(span[sortIndices[lo + child - 1]], span[sortIndices[lo + child]]) < 0) 699if (!(comparer.Compare(d, span[sortIndices[lo + child - 1]]) < 0)) 721var t = span[sortIndices[j + 1]]; 723if (j >= lo && comparer.Compare(t, span[sortIndices[j]]) < 0) 730while (j >= lo && comparer.Compare(t, span[sortIndices[j]]) < 0); 754if (comparer.Compare(span[sortIndices[i]], span[sortIndices[j]]) > 0)
DataFrameColumns\ArrowStringDataFrameColumn.cs (2)
243int currentOffset = offsetBufferSpan[indexInBuffer]; 244int nextOffset = offsetBufferSpan[indexInBuffer + 1];
DataFrameColumns\StringDataFrameColumn.cs (2)
354ret[index] = BitUtility.IsValid(validitySpan, i) ? this[span[i]] : null; 376ret[index] = BitUtility.IsValid(validitySpan, i) ? this[span[i]] : null;
DataFrameColumns\VBufferDataFrameColumn.cs (2)
240ret[index] = BitUtility.IsValid(validitySpan, i) ? this[span[i]] : default; 262ret[index] = BitUtility.IsValid(validitySpan, i) ? this[span[i]] : default;
DateTimeComputation.cs (4)
41var val = readOnlySpan[i]; 113var val = readOnlySpan[i]; 209var val = readOnlySpan[i]; 267var val = readOnlySpan[i];
PrimitiveColumnContainer.BinaryOperations.cs (3)
34leftSpan[j] = arithmetic.HandleOperation(operation, leftSpan[j], rightSpan[j]); 195destination[i] = (byte)(left[i] & right[i]);
PrimitiveColumnContainer.cs (13)
506long mapRowIndex = mapIndicesIntSpan.IsEmpty ? mapIndicesLongSpan[spanIndex] : mapIndicesIntSpan[spanIndex]; 583newBuffer.Append(ByteConverter<T>.Instance.GetByte(span[i])); 602newBuffer.Append(SByteConverter<T>.Instance.GetSByte(span[i])); 621newBuffer.Append(DoubleConverter<T>.Instance.GetDouble(span[i])); 640newBuffer.Append(DecimalConverter<T>.Instance.GetDecimal(span[i])); 659newBuffer.Append(Int16Converter<T>.Instance.GetInt16(span[i])); 678newBuffer.Append(UInt16Converter<T>.Instance.GetUInt16(span[i])); 697newBuffer.Append(Int32Converter<T>.Instance.GetInt32(span[i])); 716newBuffer.Append(UInt32Converter<T>.Instance.GetUInt32(span[i])); 735newBuffer.Append(Int64Converter<T>.Instance.GetInt64(span[i])); 754newBuffer.Append(UInt64Converter<T>.Instance.GetUInt64(span[i])); 773newBuffer.Append(SingleConverter<T>.Instance.GetSingle(span[i]));
PrimitiveDataFrameColumn.cs (4)
156builder.Append(valueSpan[i]); 373ret[j++] = span[i]; 630bool containsKey = multimap.TryGetValue(readOnlySpan[i], out ICollection<long> values); 637multimap.Add(readOnlySpan[i], new List<long>() { currentLength });
PrimitiveDataFrameColumnComputations.cs (98)
131if (span[i] == false) 149if (span[i] == true) 286ret = (byte)(Math.Max(readOnlySpan[i], ret)); 350ret = (byte)(Math.Min(readOnlySpan[i], ret)); 414ret = (byte)(readOnlySpan[i] * ret); 478ret = (byte)(readOnlySpan[i] + ret); 542value = (byte)(Math.Max(readOnlySpan[i], value)); 590value = (byte)(Math.Min(readOnlySpan[i], value)); 636ret = (byte)(readOnlySpan[i] * ret); 682value = (byte)(readOnlySpan[i] + value); 773ret = (char)(Math.Max(readOnlySpan[i], ret)); 837ret = (char)(Math.Min(readOnlySpan[i], ret)); 901ret = (char)(readOnlySpan[i] * ret); 965ret = (char)(readOnlySpan[i] + ret); 1029value = (char)(Math.Max(readOnlySpan[i], value)); 1077value = (char)(Math.Min(readOnlySpan[i], value)); 1123ret = (char)(readOnlySpan[i] * ret); 1169value = (char)(readOnlySpan[i] + value); 1260ret = (decimal)(Math.Max(readOnlySpan[i], ret)); 1324ret = (decimal)(Math.Min(readOnlySpan[i], ret)); 1388ret = (decimal)(readOnlySpan[i] * ret); 1452ret = (decimal)(readOnlySpan[i] + ret); 1516value = (decimal)(Math.Max(readOnlySpan[i], value)); 1564value = (decimal)(Math.Min(readOnlySpan[i], value)); 1610ret = (decimal)(readOnlySpan[i] * ret); 1656value = (decimal)(readOnlySpan[i] + value); 1747ret = (double)(Math.Max(readOnlySpan[i], ret)); 1811ret = (double)(Math.Min(readOnlySpan[i], ret)); 1875ret = (double)(readOnlySpan[i] * ret); 1939ret = (double)(readOnlySpan[i] + ret); 2003value = (double)(Math.Max(readOnlySpan[i], value)); 2051value = (double)(Math.Min(readOnlySpan[i], value)); 2097ret = (double)(readOnlySpan[i] * ret); 2143value = (double)(readOnlySpan[i] + value); 2234ret = (float)(Math.Max(readOnlySpan[i], ret)); 2298ret = (float)(Math.Min(readOnlySpan[i], ret)); 2362ret = (float)(readOnlySpan[i] * ret); 2426ret = (float)(readOnlySpan[i] + ret); 2490value = (float)(Math.Max(readOnlySpan[i], value)); 2538value = (float)(Math.Min(readOnlySpan[i], value)); 2584ret = (float)(readOnlySpan[i] * ret); 2630value = (float)(readOnlySpan[i] + value); 2721ret = (int)(Math.Max(readOnlySpan[i], ret)); 2785ret = (int)(Math.Min(readOnlySpan[i], ret)); 2849ret = (int)(readOnlySpan[i] * ret); 2913ret = (int)(readOnlySpan[i] + ret); 2977value = (int)(Math.Max(readOnlySpan[i], value)); 3025value = (int)(Math.Min(readOnlySpan[i], value)); 3071ret = (int)(readOnlySpan[i] * ret); 3117value = (int)(readOnlySpan[i] + value); 3208ret = (long)(Math.Max(readOnlySpan[i], ret)); 3272ret = (long)(Math.Min(readOnlySpan[i], ret)); 3336ret = (long)(readOnlySpan[i] * ret); 3400ret = (long)(readOnlySpan[i] + ret); 3464value = (long)(Math.Max(readOnlySpan[i], value)); 3512value = (long)(Math.Min(readOnlySpan[i], value)); 3558ret = (long)(readOnlySpan[i] * ret); 3604value = (long)(readOnlySpan[i] + value); 3695ret = (sbyte)(Math.Max(readOnlySpan[i], ret)); 3759ret = (sbyte)(Math.Min(readOnlySpan[i], ret)); 3823ret = (sbyte)(readOnlySpan[i] * ret); 3887ret = (sbyte)(readOnlySpan[i] + ret); 3951value = (sbyte)(Math.Max(readOnlySpan[i], value)); 3999value = (sbyte)(Math.Min(readOnlySpan[i], value)); 4045ret = (sbyte)(readOnlySpan[i] * ret); 4091value = (sbyte)(readOnlySpan[i] + value); 4182ret = (short)(Math.Max(readOnlySpan[i], ret)); 4246ret = (short)(Math.Min(readOnlySpan[i], ret)); 4310ret = (short)(readOnlySpan[i] * ret); 4374ret = (short)(readOnlySpan[i] + ret); 4438value = (short)(Math.Max(readOnlySpan[i], value)); 4486value = (short)(Math.Min(readOnlySpan[i], value)); 4532ret = (short)(readOnlySpan[i] * ret); 4578value = (short)(readOnlySpan[i] + value); 4669ret = (uint)(Math.Max(readOnlySpan[i], ret)); 4733ret = (uint)(Math.Min(readOnlySpan[i], ret)); 4797ret = (uint)(readOnlySpan[i] * ret); 4861ret = (uint)(readOnlySpan[i] + ret); 4925value = (uint)(Math.Max(readOnlySpan[i], value)); 4973value = (uint)(Math.Min(readOnlySpan[i], value)); 5019ret = (uint)(readOnlySpan[i] * ret); 5065value = (uint)(readOnlySpan[i] + value); 5156ret = (ulong)(Math.Max(readOnlySpan[i], ret)); 5220ret = (ulong)(Math.Min(readOnlySpan[i], ret)); 5284ret = (ulong)(readOnlySpan[i] * ret); 5348ret = (ulong)(readOnlySpan[i] + ret); 5412value = (ulong)(Math.Max(readOnlySpan[i], value)); 5460value = (ulong)(Math.Min(readOnlySpan[i], value)); 5506ret = (ulong)(readOnlySpan[i] * ret); 5552value = (ulong)(readOnlySpan[i] + value); 5643ret = (ushort)(Math.Max(readOnlySpan[i], ret)); 5707ret = (ushort)(Math.Min(readOnlySpan[i], ret)); 5771ret = (ushort)(readOnlySpan[i] * ret); 5835ret = (ushort)(readOnlySpan[i] + ret); 5899value = (ushort)(Math.Max(readOnlySpan[i], value)); 5947value = (ushort)(Math.Min(readOnlySpan[i], value)); 5993ret = (ushort)(readOnlySpan[i] * ret); 6039value = (ushort)(readOnlySpan[i] + value);
ReadOnlyDataFrameBuffer.cs (2)
72return ReadOnlySpan[index]; 83sb.Append(span[i]).Append(" ");
Utils\BitUtility.cs (10)
39var thisBitMap = bitMapBufferSpan[nullBitMapSpanIndex]; 57(data[index / 8] & BitMask[index % 8]) != 0; 61data[index / 8] &= (byte)~BitMask[index % 8]; 66data[index / 8] |= BitMask[index % 8]; 74? (byte)(data[idx] | BitMask[mod]) 75: (byte)(data[idx] & ~BitMask[mod]); 155count += PopcountTable[span[i]]; 161var partialByte = span[endByteIndex];
Microsoft.Data.Analysis.Tests (1)
VBufferColumnTests.cs (1)
68Assert.Equal(originalValues[i], values[i]);
Microsoft.Diagnostics.DataContractReader.Contracts (17)
Contracts\Debugger\Debugger_1.cs (2)
298SetRegisterChecked(ctx, cc.IntegerArgRegisters[i], args[i], target.PointerSize); 304StackPusher.PushSlot(target, ref sp, args[i], align: false);
Contracts\EcmaMetadata_1.cs (2)
173if (targetEcmaMetadata.Schema.RowCount[i] != 0) 182if (targetEcmaMetadata.Schema.IsSorted[i])
Contracts\RuntimeTypeSystem_1.cs (2)
1217if (!(instantiation[i].Address == typeArguments[i].Address)) 1243if (candidateRetAndArgs[i].Address != retAndArgTypes[i].Address)
Contracts\StackWalk\Context\ARM\ARMUnwinder.cs (1)
851byte tableValue = UnwindOpTable[opcode];
Contracts\StackWalk\Context\ARM64\ARM64Unwinder.cs (2)
1032return UnwindCodeSizeTable[unwindCode - 0xE0]; 1040return UnwindCodeInstructionCountTable[unwindCode - 0xE0];
Contracts\StackWalk\Context\LoongArch64\LoongArch64Unwinder.cs (2)
269unwindCodePtr += UnwindCodeSizeTable[curCode]; 323unwindCodePtr += UnwindCodeSizeTable[opcode];
Contracts\StackWalk\Context\RISCV64\RISCV64Unwinder.cs (2)
283unwindCodePtr += UnwindCodeSizeTable[curCode]; 337unwindCodePtr += UnwindCodeSizeTable[opcode];
Contracts\StackWalk\GC\GcSignatureTypeProvider.cs (2)
93return ClassifyTypeHandle(instantiation[index]); 123return ClassifyTypeHandle(instantiation[index]);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\Dwarf\DwarfHelper.cs (2)
116@byte = buffer[pos++]; 135@byte = buffer[pos++];
Microsoft.Diagnostics.DataContractReader.Legacy (30)
_generated\32\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSDacInterface.cs (10)
307__values_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__values_native__managedSpan[__i0]); 369__values_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__values_native__nativeSpan[__i0]); 546__values_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__values_native__managedSpan[__i0]); 610__values_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__values_native__nativeSpan[__i0]); 903__modules_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__modules_native__managedSpan[__i0]); 967__modules_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__modules_native__nativeSpan[__i0]); 2299__heaps_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__heaps_native__managedSpan[__i0]); 2361__heaps_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__heaps_native__nativeSpan[__i0]); 3965__values_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__values_native__managedSpan[__i0]); 4029__values_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__values_native__nativeSpan[__i0]);
_generated\35\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSDacInterface4.cs (2)
59__arguments_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__arguments_native__managedSpan[__i0]); 121__arguments_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__arguments_native__nativeSpan[__i0]);
_generated\41\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSDacInterface10.cs (2)
68__mowList_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__mowList_native__managedSpan[__i0]); 132__mowList_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__mowList_native__nativeSpan[__i0]);
_generated\50\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.cs (2)
112__args_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__args_native__managedSpan[__i0]); 174__args_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__args_native__nativeSpan[__i0]);
ClrDataFrame.cs (2)
748return ResolveGenericParam(rts, methodInst[index]); 761return ResolveGenericParam(rts, typeInst[index]);
Dbi\DacDbiImpl.cs (7)
1552if (cdac[i] != legacy[i]) 1554sb.Append($" @0x{i:X3} cdac=0x{cdac[i]:X2} dac=0x{legacy[i]:X2};"); 3143FillExpandedTypeDataWithCanonFallback(rts, classInst[i], thCanon, &entry); 3151FillExpandedTypeDataWithCanonFallback(rts, methodInst[i], thCanon, &entry); 3404TypeHandleToExpandedTypeInfoImpl(rts, AreValueTypesBoxed.NoValueTypeBoxing, instantiation[i], &entry);
SigFormat.cs (4)
215AddType(target, stringBuilder, methodInstantiation[mvarIndex]); 227AddType(target, stringBuilder, typeInstantiation[varIndex]); 369AddType(target, stringBuilder, instantiation[i]); 423AddType(target, stringBuilder, retAndArgTypes[i]);
TypeNameBuilder.cs (1)
257AppendType(tnb.Target, stringBuilder, retAndArgTypes[i], format);
Microsoft.DiaSymReader (109)
_generated\18\Microsoft.DiaSymReader.ISymUnmanagedEncUpdate.cs (3)
173__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 215void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 248void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
_generated\19\Microsoft.DiaSymReader.ISymUnmanagedMethod.cs (9)
410__parameters_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__parameters_native__managedSpan[__i0]); 452void* __parameters_native__nativeSpan____i0_exactType = (void*)__parameters_native__nativeSpan[__i0]; 485void* __parameters_native__nativeSpan____i0_exactType = (void*)__parameters_native__nativeSpan[__i0]; 603__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 647void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 692void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 751__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 798void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 858void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0];
_generated\20\Microsoft.DiaSymReader.ISymUnmanagedMethod2.cs (6)
296__parameters_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__parameters_native__managedSpan[__i0]); 338void* __parameters_native__nativeSpan____i0_exactType = (void*)__parameters_native__nativeSpan[__i0]; 413__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 457void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 495__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 542void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0];
_generated\21\Microsoft.DiaSymReader.ISymUnmanagedNamespace.cs (6)
118__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 160void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 193void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 251__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 293void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 326void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
_generated\22\Microsoft.DiaSymReader.ISymUnmanagedReader.cs (15)
156__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 198void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 231void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 451__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 493void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 526void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 584__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 626void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 659void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 840__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 882void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 915void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 1200__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 1243void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0]; 1278void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
_generated\23\Microsoft.DiaSymReader.ISymUnmanagedReader2.cs (13)
198__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 241void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0]; 276void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0]; 373__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 415void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 546__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 588void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 626__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 668void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 771__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 813void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 974__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 1017void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
_generated\24\Microsoft.DiaSymReader.ISymUnmanagedReader3.cs (12)
233__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 275void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 406__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 448void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 486__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 528void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 631__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 673void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 834__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 877void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0]; 1046__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 1089void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
_generated\25\Microsoft.DiaSymReader.ISymUnmanagedReader4.cs (12)
268__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 310void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 441__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 483void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 521__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 563void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 666__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 708void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 869__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 912void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0]; 1081__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 1124void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
_generated\26\Microsoft.DiaSymReader.ISymUnmanagedReader5.cs (12)
173__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 215void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 346__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 388void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 426__variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]); 468void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0]; 571__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 613void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 774__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 817void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0]; 986__methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]); 1029void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
_generated\28\Microsoft.DiaSymReader.ISymUnmanagedScope.cs (9)
193__children_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedScope>.ConvertToUnmanaged(__children_native__managedSpan[__i0]); 235void* __children_native__nativeSpan____i0_exactType = (void*)__children_native__nativeSpan[__i0]; 268void* __children_native__nativeSpan____i0_exactType = (void*)__children_native__nativeSpan[__i0]; 458__locals_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__locals_native__managedSpan[__i0]); 500void* __locals_native__nativeSpan____i0_exactType = (void*)__locals_native__nativeSpan[__i0]; 533void* __locals_native__nativeSpan____i0_exactType = (void*)__locals_native__nativeSpan[__i0]; 591__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 633void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0]; 666void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0];
_generated\29\Microsoft.DiaSymReader.ISymUnmanagedScope2.cs (9)
115__constants_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedConstant>.ConvertToUnmanaged(__constants_native__managedSpan[__i0]); 157void* __constants_native__nativeSpan____i0_exactType = (void*)__constants_native__nativeSpan[__i0]; 190void* __constants_native__nativeSpan____i0_exactType = (void*)__constants_native__nativeSpan[__i0]; 320__children_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedScope>.ConvertToUnmanaged(__children_native__managedSpan[__i0]); 362void* __children_native__nativeSpan____i0_exactType = (void*)__children_native__nativeSpan[__i0]; 463__locals_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__locals_native__managedSpan[__i0]); 505void* __locals_native__nativeSpan____i0_exactType = (void*)__locals_native__nativeSpan[__i0]; 543__namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]); 585void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0];
_generated\9\Microsoft.DiaSymReader.ISymEncUnmanagedMethod.cs (3)
230__documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]); 272void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0]; 305void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0];
Microsoft.DotNet.HotReload.Watch (4)
_generated\0\RegexGenerator.g.cs (4)
239while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 270if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 444while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 475if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Microsoft.DotNet.NativeWrapper (2)
_generated\0\LibraryImports.g.cs (2)
199__argv_native__nativeSpan[__i0] = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(__argv_native__managedSpan[__i0]); 228global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__argv_native__nativeSpan[__i0]);
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
1328contents.Add(CreateFunctionResultContent(results[i]));
Microsoft.Extensions.AI.Abstractions (1)
Embeddings\BinaryEmbedding.cs (1)
73result[i] = utf8[i] switch
Microsoft.Extensions.AI.Integration.Tests (1)
QuantizationEmbeddingGenerator.cs (1)
53if (vector[i] > 0)
Microsoft.Extensions.Caching.Hybrid (2)
Internal\HybridCachePayload.cs (2)
389byteReadJustNow = buffer[index++]; 403byteReadJustNow = buffer[index++];
Microsoft.Extensions.Diagnostics.ResourceMonitoring (8)
Linux\LinuxUtilizationParserCgroupV1.cs (4)
384while (numberStart < buffer.Length && char.IsWhiteSpace(buffer[numberStart])) 389if (numberStart == buffer.Length || !char.IsDigit(buffer[numberStart])) 398while (numberEnd < buffer.Length && char.IsDigit(buffer[numberEnd])) 400int current = buffer[numberEnd] - '0';
Linux\LinuxUtilizationParserCgroupV2.cs (4)
614while (numberStart < buffer.Length && char.IsWhiteSpace(buffer[numberStart])) 619if (numberStart == buffer.Length || !char.IsDigit(buffer[numberStart])) 628while (numberEnd < buffer.Length && char.IsDigit(buffer[numberEnd])) 630int current = buffer[numberEnd] - '0';
Microsoft.Extensions.Http.Diagnostics (9)
Http\HttpDependencyMetadataResolver.cs (3)
113if (routeSpan.Length > 1 && routeSpan[routeSpan.Length - 1] == '/') 369if (requestRouteAsSpan[requestRouteAsSpan.Length - 1] == '/') 385char ch = _toUpper[requestRouteAsSpan[i]];
Latency\Internal\HttpClientLatencyLogEnricher.cs (6)
109_ = stringBuilder.Append(latencyData.Checkpoints[i].Name); 117var cp = latencyData.Checkpoints[i]; 130_ = stringBuilder.Append(latencyData.Measures[i].Name); 138_ = stringBuilder.Append(latencyData.Measures[i].Value); 150_ = stringBuilder.Append(latencyData.Tags[i].Name); 158_ = stringBuilder.Append(latencyData.Tags[i].Value);
Microsoft.Extensions.Identity.Core (1)
Base32.cs (1)
90var byteIndex = _base32Chars.IndexOf(char.ToUpperInvariant(trimmedInput[inputIndex]));
Microsoft.Extensions.Logging.Console (10)
AnsiParser.cs (10)
58if (span[i] == EscapeChar && span.Length >= i + 4 && span[i + 1] == '[') 60if (span[i + 3] == 'm') 63if (IsDigit(span[i + 2])) 65escapeCode = (int)(span[i + 2] - '0'); 78else if (span.Length >= i + 5 && span[i + 4] == 'm') 81if (IsDigit(span[i + 2]) && IsDigit(span[i + 3])) 83escapeCode = (int)(span[i + 2] - '0') * 10 + (int)(span[i + 3] - '0');
Microsoft.Extensions.Primitives (2)
StringSegment.cs (2)
598if (!char.IsWhiteSpace(span[i])) 618if (!char.IsWhiteSpace(span[i]))
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsPrimitives.cs (2)
190byte length = messageBuffer.Span[currentOffset]; 235int pointer = ((length & 0x3F) << 8) | messageBuffer.Span[currentOffset + 1];
Microsoft.Extensions.Telemetry (6)
Latency\Internal\LatencyConsoleExporter.cs (6)
64nameColumnWidth = Math.Max(nameColumnWidth, latencyData.Checkpoints[i].Name.Length); 70var c = latencyData.Checkpoints[i]; 80nameColumnWidth = Math.Max(nameColumnWidth, latencyData.Tags[i].Name.Length); 86var t = latencyData.Tags[i]; 96nameColumnWidth = Math.Max(nameColumnWidth, latencyData.Measures[i].Name.Length); 102var m = latencyData.Measures[i];
Microsoft.Extensions.Telemetry.Tests (1)
Latency\Internal\TagCollectionTests.cs (1)
106if (tags[i].Value != string.Empty)
Microsoft.Interop.ComInterfaceGenerator (1)
ComInterfaceGeneratorHelpers.cs (1)
46literals[i] = ExpressionElement(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(bytes[i])));
Microsoft.Maui (1)
Debugger\DebuggerDisplayHelpers.cs (1)
48 var kvp = values[i];
Microsoft.Maui.Essentials (2)
Types\Shared\WebUtils.shared.cs (2)
64 chars[i] = span[i] == '+' ? ' ' : span[i];
Microsoft.Maui.Graphics (1)
Color.cs (1)
1000 if (!elem.IsEmpty && elem[elem.Length - 1] == '%' && acceptPercent)
Microsoft.ML.Core (286)
Data\AnnotationUtils.cs (6)
402if (catIndicesValues[i] > catIndicesValues[i + 1] || 403catIndicesValues[i] <= previousEndIndex || 404catIndicesValues[i] >= columnSlotsCount || 405catIndicesValues[i + 1] >= columnSlotsCount) 411previousEndIndex = catIndicesValues[i + 1];
Data\ReadOnlyMemoryUtils.cs (12)
162if (span[ichMin] != ' ' && span[ichLim - 1] != ' ') 165while (ichMin < ichLim && span[ichMin] == ' ') 167while (ichMin < ichLim && span[ichLim - 1] == ' ') 183if (!char.IsWhiteSpace(span[ichMin]) && !char.IsWhiteSpace(span[ichLim - 1])) 186while (ichMin < ichLim && char.IsWhiteSpace(span[ichMin])) 188while (ichMin < ichLim && char.IsWhiteSpace(span[ichLim - 1])) 204if (!char.IsWhiteSpace(span[ichLim - 1])) 207while (0 < ichLim && char.IsWhiteSpace(span[ichLim - 1])) 223char ch = CharUtils.ToLowerInvariant(span[j]); 224if (ch != span[j])
Utilities\ArrayUtils.cs (5)
60if (input[mid] >= value) 66Debug.Assert(minCur == min || input[minCur - 1] < value); 67Debug.Assert(limCur == lim || input[limCur] >= value); 70Debug.Assert(minCur == min || input[minCur - 1] < value); 71Debug.Assert(limCur == lim || input[limCur] >= value);
Utilities\DoubleParser.cs (33)
122if (!char.IsWhiteSpace(span[ich])) 129char ch = span[ich]; 152if (!char.IsWhiteSpace(span[ichEnd])) 174if (!char.IsWhiteSpace(span[ich])) 181char ch = span[ich]; 204if (!char.IsWhiteSpace(span[ichEnd])) 496switch (span[ich]) 505if (ich + 3 <= span.Length && span[ich + 1] == 'a' && span[ich + 2] == 'N') 514if (ich + 8 <= span.Length && span[ich + 1] == 'n' && span[ich + 2] == 'f' && span[ich + 3] == 'i' && span[ich + 4] == 'n' && span[ich + 5] == 'i' && span[ich + 6] == 't' && span[ich + 7] == 'y') 523if (ich + 2 <= span.Length && span[ich + 1] == InfinitySymbol) 530if (ich + 9 <= span.Length && span[ich + 1] == 'I' && span[ich + 2] == 'n' && span[ich + 3] == 'f' && span[ich + 4] == 'i' && span[ich + 5] == 'n' && span[ich + 6] == 'i' && span[ich + 7] == 't' && span[ich + 8] == 'y') 573switch (span[i]) 617if ((d = (uint)span[i] - '0') > 9) 634if (span[i] != decimalMarker) 639Contracts.Assert(span[i] == decimalMarker); 652if ((d = (uint)span[i] - '0') > 9) 672switch (span[i]) 687switch (span[i]) 712if ((d = (uint)span[i] - '0') > 9)
Utilities\FloatUtils.cs (2)
449var v = values[i]; 462var v = values[i];
Utilities\Hashing.cs (4)
132uint ch = toUpper ? char.ToUpperInvariant(span[ich]) : span[ich]; 198uint ch = toUpper ? char.ToUpperInvariant(span[ich]) : span[ich];
Utilities\LineParser.cs (4)
29if (i == valuesToParse.Length || valuesToParse[i] == ' ' || valuesToParse[i] == '\t') 62if (valuesToParse[i] == ' ' || valuesToParse[i] == '\t')
Utilities\MathUtils.cs (14)
152if (max <= a[i]) 155max = a[i]; 181if (min >= a[i]) 184min = a[i]; 209if (inputs[i] > max) 212max = inputs[i]; 229if (inputs[i] > cutoff) 230intermediate += Math.Exp(inputs[i] - max); 748ab += (Double)a[aIdx] * b[bIdx]; 749a2 += (Double)a[aIdx] * a[aIdx]; 750b2 += (Double)b[bIdx] * b[bIdx];
Utilities\NormStr.cs (1)
190if (value.Span[ich] != sb[ich])
Utilities\Stream.cs (12)
72writer.Write(values[i]); 83writer.Write(values[i]); 95writer.Write(values[i]); 106writer.Write(values[i]); 139writer.Write(values[i]); 176writer.Write(values[i]); 206writer.Write(values[i]); 218writer.Write(values[i]); 229writer.Write(values[i]); 241writer.Write(values[i] ? (byte)1 : (byte)0); 252writer.Write(values[i] ? (byte)1 : (byte)0); 264writer.Write((short)values[i]);
Utilities\Utils.cs (7)
254return index < lim && input[index] == value; 686if (values[i] <= prev) 688prev = values[i]; 709if (values[i] <= prev) 711prev = values[i]; 1274if (predicate(source[i])) 1286if (!predicate(source[i]))
Utilities\VBufferUtils.cs (186)
28if (Single.IsNaN(values[i])) 39if (Double.IsNaN(values[i])) 50if (!FloatUtils.IsFinite(values[i])) 61if (!FloatUtils.IsFinite(values[i])) 93visitor(i, aValues[i]); 99visitor(aIndices[i], aValues[i]); 123visitor(i, aValues[i], bValues[i]); 129visitor(aIndices[i], aValues[i], bValues[aIndices[i]]); 135visitor(bIndices[i], aValues[bIndices[i]], bValues[i]); 146int i = aIndices[aI]; 147int j = bIndices[bI]; 149visitor(i, aValues[aI++], bValues[bI++]); 174visitor(i, aValues[i], bValues[i]); 182T aVal = (aI < aValues.Length && i == aIndices[aI]) ? aValues[aI++] : default(T); 183visitor(i, aVal, bValues[i]); 192T bVal = (bI < bValues.Length && i == bIndices[bI]) ? bValues[bI++] : default(T); 193visitor(i, aValues[i], bVal); 205int diff = aIndices[aI] - bIndices[bI]; 208visitor(bIndices[bI], aValues[aI], bValues[bI]); 214visitor(aIndices[aI], aValues[aI], default(T)); 219visitor(bIndices[bI], default(T), bValues[bI]); 226visitor(aIndices[aI], aValues[aI], default(T)); 232visitor(bIndices[bI], default(T), bValues[bI]); 284manip(dstIndices[i], ref editor.Values[i]); 370Contracts.Assert(i <= indices[i]); 371editor.Values[indices[i]] = values[i]; 380editor.Values.Slice(min, indices[ii] - min).Clear(); 381min = indices[ii] + 1; 390editor.Values[indices[i]] = values[i]; 404if (dst.IsDense || denseCount == 0 || (dstValues.Length >= denseCount && dstIndices[denseCount - 1] == denseCount - 1)) 438editor.Values[ii] = i >= 0 && dstIndices[i] == ii ? dstValues[i--] : default(T); 462if (!isDefaultPredicate(in srcValues[i])) 478if (!isDefaultPredicate(in srcValues[i])) 482editor.Values[j] = srcValues[i]; 637manip(dstIndices[i], default(TSrc), ref editor.Values[i]); 653manip(i, srcValues[i], ref editor.Values[i]); 664int sIndex = srcIndices[sI]; 669manip(i, srcValues[sI], ref editor.Values[i]); 670sIndex = ++sI == srcValues.Length ? src.Length : srcIndices[sI]; 679manip(srcIndices[i], srcValues[i], ref editor.Values[srcIndices[i]]); 694manip(editor.Indices[i] = srcIndices[i], srcValues[i], ref editor.Values[i]); 705int sIndex = srcIndices[sI]; 706while (dI < dstValues.Length && dstIndices[dI] < sIndex) 713if (dstIndices[dI] == sIndex) 754int sIndex = srcIndices[sI]; 755int dIndex = dstIndices[dI]; 764values[i] = dstValues[dI]; 767dIndex = --dI >= 0 ? dstIndices[dI] : -1; 773manip(sIndex, srcValues[sI], ref values[i]); 774sIndex = --sI >= 0 ? srcIndices[sI] : -1; 782values[i] = dstValues[dI]; 783manip(sIndex, srcValues[sI], ref values[i]); 784sIndex = --sI >= 0 ? srcIndices[sI] : -1; 785dIndex = --dI >= 0 ? dstIndices[dI] : -1; 800Contracts.Assert(srcIndices[i] == dstIndices[i]); 801manip(srcIndices[i], srcValues[i], ref editor.Values[i]); 811int sIndex = srcIndices[sI]; 814if (dstIndices[i] == sIndex) 816manip(sIndex, srcValues[sI], ref editor.Values[i]); 817sIndex = ++sI == srcValues.Length ? src.Length : srcIndices[sI]; 820manip(dstIndices[i], default(TSrc), ref editor.Values[i]); 827int sIndex = srcIndices[sI]; 828while (dstIndices[dI] < sIndex) 830Contracts.Assert(dstIndices[dI] == sIndex); 831manip(sIndex, srcValues[sI], ref editor.Values[dI++]); 847int bIndex = dstIndices[dI]; 848while (srcIndices[sI] < bIndex) 850Contracts.Assert(srcIndices[sI] == bIndex); 862manip(srcIndices[sI], srcValues[sI], ref editor.Values[sI]); 897manip(i, srcValues[i], default(TDst), ref editor.Values[i]); 910int i = srcIndices[ii]; 912manip(i, srcValues[ii], default(TDst), ref editor.Values[ii]); 926manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); 932editor.Values[j] = dstValues[j]; 940manip(i, srcValues[i], dstValues[i], ref editor.Values[i]); 951int i = srcIndices[ii]; 959manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); 960i = ++ii == count ? length : srcIndices[ii]; 963manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); 973manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); 974i = ++ii == count ? length : srcIndices[ii]; 977editor.Values[j] = dstValues[j]; 996int j = dstIndices[jj]; 998manip(j, default(TSrc), dstValues[jj], ref editor.Values[jj]); 1005editor.Indices[jj] = dstIndices[jj]; 1006editor.Values[jj] = dstValues[jj]; 1016int j = dstIndices[jj]; 1021manip(i, srcValues[i], dstValues[jj], ref editor.Values[i]); 1022j = ++jj == dstCount ? length : dstIndices[jj]; 1025manip(i, srcValues[i], default(TDst), ref editor.Values[i]); 1039int i = srcIndices[ii]; 1040while (jj < dstValues.Length && dstIndices[jj] < i) 1047if (dstIndices[jj] == i) 1071int i = srcIndices[ii]; 1073int j = dstIndices[jj]; 1082manip(i, srcValues[ii], dstValues[jj], ref editor.Values[kk]); 1083i = ++ii == srcValues.Length ? length : srcIndices[ii]; 1084j = ++jj == dstCount ? length : dstIndices[jj]; 1090manip(i, srcValues[ii], default(TDst), ref editor.Values[kk]); 1091i = ++ii == srcValues.Length ? length : srcIndices[ii]; 1100manip(j, default(TSrc), dstValues[jj], ref editor.Values[kk]); 1102editor.Values[kk] = dstValues[jj]; 1103j = ++jj == dstCount ? length : dstIndices[jj]; 1146values[i] = func(i, srcValues[i]); 1154values[i] = func(srcIndices[i], srcValues[i]); 1207TSrc1 aVal = (aI < aIndices.Length && i == aIndices[aI]) ? aValues[aI++] : default(TSrc1); 1208editor.Values[i] = func(i, aVal, bValues[i]); 1217TSrc2 bVal = (bI < bIndices.Length && i == bIndices[bI]) ? bValues[bI++] : default(TSrc2); 1218editor.Values[i] = func(i, aValues[i], bVal); 1225editor.Values[i] = func(i, aValues[i], bValues[i]); 1237int aCompB = aIndices[aI] - bIndices[bI]; 1264Contracts.Assert(aIndices[aI] == bIndices[aI]); 1265editor.Values[aI] = func(aIndices[aI], aValues[aI], bValues[aI]); 1275Contracts.Assert(aIndices[aI] >= bIndices[bI]); 1276TSrc1 aVal = aIndices[aI] == bIndices[bI] ? aValues[aI++] : default(TSrc1); 1277editor.Values[bI] = func(bIndices[bI], aVal, bValues[bI]); 1280editor.Values[bI] = func(bIndices[bI], default(TSrc1), bValues[bI]); 1290Contracts.Assert(bIndices[bI] >= aIndices[aI]); 1291TSrc2 bVal = aIndices[aI] == bIndices[bI] ? bValues[bI++] : default(TSrc2); 1292editor.Values[aI] = func(aIndices[aI], aValues[aI], bVal); 1295editor.Values[aI] = func(aIndices[aI], aValues[aI], default(TSrc2)); 1305int aCompB = aIndices[aI] - bIndices[bI]; 1310index = aIndices[aI]; 1311aVal = aValues[aI++]; 1316index = bIndices[bI]; 1318bVal = bValues[bI++]; 1322index = aIndices[aI]; 1323Contracts.Assert(index == bIndices[bI]); 1324aVal = aValues[aI++]; 1325bVal = bValues[bI++]; 1333int index = aIndices[aI]; 1334editor.Values[newI] = func(index, aValues[aI], default(TSrc2)); 1340int index = bIndices[bI]; 1341editor.Values[newI] = func(index, default(TSrc1), bValues[bI]);
Microsoft.ML.Core.Tests (7)
UnitTests\TestEntryPoints.cs (7)
2274if (!Single.IsNaN(dense1Values[i]) && !Single.IsNaN(dense2Values[i]) && dense1Values[i] != dense2Values[i]) 5413Assert.True(ReadOnlyMemoryUtils.EqualsStr(i.ToString(), slotNameValues[i])); 6114Assert.Equal(avgValues[i], sumValues[i] / 2);
Microsoft.ML.CpuMath (19)
AlignedArray.cs (3)
154Contracts.Assert(posMin <= rgposSrc[ipos]); 155int iv = _base + rgposSrc[ipos] - posMin; 157Items[iv] = valuesSrc[ipos];
CpuMathUtils.netcoreapp.cs (16)
149int col = rgposSrc[j] - posMin; 211int index = indices[i]; 212destination[index] += scale * source[i]; 247int index = indices[i]; 248destination[index] += source[i]; 277result += (source[i] - mean) * (source[i] - mean); 307sum += Math.Abs(source[i] - mean); 336float abs = Math.Abs(source[i]); 370float abs = Math.Abs(source[i] - mean); 412int index = indices[i]; 413result += left[index] * right[i]; 543v[i] += source[i] * primalUpdate; 585int index = indices[i]; 586v[index] += source[i] * primalUpdate;
Microsoft.ML.Data (272)
Data\BufferBuilder.cs (6)
408_comb.Combine(ref _values[index + i], values[i]); 414AddFeature(index + i, values[i]); 424_comb.Combine(ref _values[index + indices[i]], values[i]); 430AddFeature(index + indices[i], values[i]);
Data\Conversion.cs (9)
771private bool HasNA(in VBuffer<R4> src) { var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (R4.IsNaN(srcValues[i])) return true; } return false; } 772private bool HasNA(in VBuffer<R8> src) { var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (R8.IsNaN(srcValues[i])) return true; } return false; } 795private bool HasZero(in VBuffer<U1> src) { if (!src.IsDense) return true; var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (srcValues[i] == 0) return true; } return false; } 796private bool HasZero(in VBuffer<U2> src) { if (!src.IsDense) return true; var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (srcValues[i] == 0) return true; } return false; } 797private bool HasZero(in VBuffer<U4> src) { if (!src.IsDense) return true; var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (srcValues[i] == 0) return true; } return false; } 798private bool HasZero(in VBuffer<U8> src) { if (!src.IsDense) return true; var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (srcValues[i] == 0) return true; } return false; } 1067char c = span[offset++]; 1189uint d = (uint)span[ich++] - (uint)'0'; 1298uint d = (uint)span[ich++] - (uint)'0';
Data\RowCursorUtils.cs (1)
286conv(in srcValues[i], ref editor.Values[i]);
DataLoadSave\Binary\Codecs.cs (2)
54Write(in values[i]); 931_indices.Add(valueIndices[i]);
DataLoadSave\Text\TextLoaderParser.cs (21)
851if (!char.IsWhiteSpace(span[ichLim - 1])) 854while (0 < ichLim && char.IsWhiteSpace(span[ichLim - 1])) 1154while (ichCur < ichLim && span[ichCur] == ' ') 1171if (_sparse && (uint)(span[ichCur] - '0') <= 9) 1178while (ichCol < ichEnd && (uint)(span[ichCol] - '0') <= 9) 1181if (ichCol < ichLim && span[ichCol] == ':') 1186ind = ind * 10 + (span[ich] - '0'); 1193while (ichCur < ichLim && span[ichCur] == ' ') 1207if (span[ichCur] == '"' && _quoting) 1229if (span[ichCur] == '"') 1235if (span[ichCur] != '"') 1253if (span[ichCur] == _escapeChar) 1263if (span[ichCur] == '"') 1273if (span[ichCur] == '"') 1287if (span[ichCur] == ' ') 1296if (IsSep(span[ichCur])) 1319if (_sep0 == span[ichCur]) 1330if (_sep0 == span[ichCur] || _sep1 == span[ichCur]) 1341if (IsSep(span[ichCur])) 1359Contracts.Assert(_seps.Contains(span[ichCur]));
DataLoadSave\Text\TextSaver.cs (7)
184Conv(in srcValues[i], ref Sb); 193Conv(in srcValues[i], ref Sb); 194appendItem(Sb, srcIndices[i]); 210var name = slotNamesValues[i]; 214int index = _slotNames.IsDense ? i : slotNamesIndices[i]; 821if (span[ichCur] == ' ') 829char ch = span[ichCur];
DataView\Transposer.cs (9)
575if (!isDefault(in rbuffValues[s])) 578values[_counts[s]++] = rbuffValues[s]; 585if (ii < rbuffIndices.Length && rbuffIndices[ii] == s) 587if (!isDefault(in rbuffValues[ii])) 590values[_counts[s]++] = rbuffValues[ii]; 626Ch.Assert(rbuff.IsDense || rbuffIndices[ii] == s); 628values[_counts[s]++] = rbuffValues[ii]; 630heap.Add(new KeyValuePair<int, int>(rbuff.IsDense ? s + 1 : rbuffIndices[ii], pair.Value)); 1248while (ii < indices.Length && indices[ii] < lim)
Deprecated\Instances\HeaderSchema.cs (3)
171ctx.SaveStringOrNull(nameValues[i].ToString()); 178ctx.Writer.Write(nameIndices[ii]); 180ctx.SaveStringOrNull(nameValues[ii].ToString());
Deprecated\Vector\VBufferMathUtils.cs (32)
281var comp = srcIndices[iS] - dstIndices[iD] + offset; 328if (iD >= 0 && offset + iS == dstIndices[iD]) // Collision. 329values[iDD] = dstValues[iD--] + c * srcValues[iS]; 331values[iDD] = c * srcValues[iS]; 341int sIndex = iS < 0 ? -1 : srcIndices[iS]; 342int dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; 350indices[iDD] = dstIndices[iD]; 351values[iDD] = dstValues[iD--] + c * srcValues[iS--]; 352sIndex = iS < 0 ? -1 : srcIndices[iS]; 353dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; 357indices[iDD] = dstIndices[iD]; 358values[iDD] = dstValues[iD--]; 359dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; 364values[iDD] = c * srcValues[iS--]; 365sIndex = iS < 0 ? -1 : srcIndices[iS]; 426Contracts.Assert(srcIndices[ind] >= ind); 427if (srcValues[ind] > 0) 428return srcIndices[ind]; 431if (srcValues[ind] == 0 && srcIndices[ind] == ind) 437while (ind < srcIndices.Length && srcIndices[ind] == ind) 440Contracts.Assert(ind == srcIndices.Length || ind < srcIndices[ind]); 462Contracts.Assert(srcIndices[ind] >= ind); 463if (srcValues[ind] < 0) 464return srcIndices[ind]; 467if (srcValues[ind] == 0 && srcIndices[ind] == ind) 473while (ind < srcIndices.Length && srcIndices[ind] == ind) 476Contracts.Assert(ind == srcIndices.Length || ind < srcIndices[ind]);
Deprecated\Vector\VectorUtils.cs (28)
85int idx = isDense ? i : aIndices[i]; 86var value = aValues[i]; 184int diff = indicesA[ia] - indicesB[ib]; 188d = valuesA[ia] - valuesB[ib]; 194d = valuesA[ia]; 199d = valuesB[ib]; 207var d = valuesA[ia]; 214var d = valuesB[ib]; 275result += aValues[iA] * bValues[aIndices[iA] - offset]; 281int aIndex = aIndices[iA]; 282int bIndex = bIndices[iB]; 285result += aValues[iA++] * bValues[iB++]; 333int d = aIndices[ia] - bIndices[ib]; 336res += aValues[ia] * bValues[ib]; 346ia = Utils.FindIndexSorted(aIndices, ia, iaLim, bIndices[ib]); 354ib = Utils.FindIndexSorted(bIndices, ib, ibLim, aIndices[ia]); 456dst[srcIndices[i]] += c * srcValues[i]; 481dst[i + offset] += c * srcValues[i]; 487dst[srcIndices[i] + offset] += c * srcValues[i];
Evaluators\EvaluatorUtils.cs (8)
703if (srcValues[j] == 0 || srcValues[j] > keyMapperCur.Length) 706editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; 714if (srcValues[j] == 0 || srcValues[j] > keyMapperCur.Length) 717editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; 718editor.Indices[j] = srcIndices[j]; 1456result.Add(values[i]);
Evaluators\MultiOutputRegressionEvaluator.cs (4)
259Double currL1Loss = Math.Abs((Double)label[i] - score[i]); 262_fnLoss[i] += _lossFunction.Loss(score[i], label[i]) * wht;
Evaluators\QuantileRegressionEvaluator.cs (10)
151var diff = Math.Abs((Double)label - scoreValues[i]); 163var diff = Math.Abs((Double)label - scoreValues[i]); 165totalL1LossEditor.Values[scoreIndices[i]] += weightedDiff; 166totalL2LossEditor.Values[scoreIndices[i]] += diff * weightedDiff; 181totalLossEditor.Values[i] += lossValues[i] * weight; 188totalLossEditor.Values[lossIndices[i]] += lossValues[i] * weight; 200editor.Values[i] = srcValues[i] * inv; 342ctx.SaveNonEmptyString(quantiles[i].ToString()); 375editor.Values[i] = string.Format("{0} ({1})", prefix, quantiles[i]).AsMemory();
Transforms\ColumnConcatenatingTransformer.cs (3)
752editor.Values[count] = bufferValues[i]; 761editor.Values[count] = bufferValues[i]; 762editor.Indices[count++] = offset + bufferIndices[i];
Transforms\Hashing.cs (29)
1051editor.Values[i] = hasher.HashCoreOld(seed, mask, srcValues[i]); 1068editor.Values[i] = hasher.HashCoreOld(seed, mask, srcValues[i]); 1081editor.Values[srcIndices[i]] = hasher.HashCoreOld(seed, mask, srcValues[i]); 1105editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); 1122editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); 1135editor.Values[srcIndices[i]] = hasher.HashCore(seed, mask, srcValues[i]); 1171editor.Values[i] = hasher.HashCoreOld(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1177editor.Values[i] = hasher.HashCoreOld(Hashing.MurmurRound(seed, (uint)srcIndices[i]), mask, srcValues[i]); 1194editor.Values[i] = hasher.HashCoreOld(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1203if (srcIndices.Length <= j || srcIndices[j] > i) 1205else if (srcIndices[j] == i) 1206editor.Values[i] = hasher.HashCoreOld(indexSeed, mask, srcValues[j++]); 1235editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1241editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)srcIndices[i]), mask, srcValues[i]); 1258editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1267if (srcIndices.Length <= j || srcIndices[j] > i) 1269else if (srcIndices[j] == i) 1270editor.Values[i] = hasher.HashCore(indexSeed, mask, srcValues[j++]); 1685Collector.Add(hashValues[i], valueValues[i]); 1731Collector.Add(hashValues[i], new KeyValuePair<int, T>(i, valueValues[i])); 1737Collector.Add(hashValues[i], new KeyValuePair<int, T>(hashIndices[i], valueValues[i]));
Transforms\InvertHashUtils.cs (1)
437buffer[i] = span[i];
Transforms\KeyToValue.cs (6)
398MapKey(in srcValues[slot], keyValues, ref editor.Values[slot]); 426MapKey(in srcValues[islot], keyValues, ref editor.Values[slot]); 427nextExplicitSlot = ++islot == srcCount ? srcSize : srcIndices[islot]; 448MapKey(in srcValues[islotSrc], keyValues, ref dstItem); 452editor.Indices[islotDst++] = srcIndices[islotSrc]; 480jsonValues.Add(keyValues[i].ToString());
Transforms\KeyToVector.cs (4)
534uint key = values[slot] - 1; 586uint key = values[slot] - 1; 599uint key = values[islot] - 1; 603editor.Indices[count++] = indices[islot] * size + (int)key;
Transforms\NormalizeColumn.cs (3)
937ColValues[i].Add(values[i]); 946var val = values[i]; 947var index = indices[i];
Transforms\NormalizeColumnDbl.cs (36)
367var val = values[j]; 377var val = values[k]; 378var j = indices[k]; 478var origVal = values[j]; 487var origVal = values[k]; 488var j = indices[k]; 838bldr.AddFeature(i, values[i] * scale[i]); 846int i = indices[ii]; 848bldr.AddFeature(i, values[ii] * scale[i]); 873bldr.AddFeature(i, (values[i] - offset[i]) * scale[i]); 880int ivSrc = indices[ii]; 887bldr.AddFeature(ivDst, (values[ii] - offset[ivDst]) * scale[ivDst]); 888ivSrc = ++ii < values.Length ? indices[ii] : size; 918bldr.AddFeature(i, (values[i] - offset[i]) * scale[i]); 925int ivSrc = indices[ii]; 932Contracts.Assert(ii < values.Length && ivSrc == indices[ii] || ii == values.Length && ivSrc == size); 945bldr.AddFeature(ivSrc, values[ii] * scale[ivSrc]); 946ivSrc = ++ii < values.Length ? indices[ii] : size; 955bldr.AddFeature(ivDst, (values[ii] - offset[ivDst]) * scale[ivDst]); 956ivSrc = ++ii < values.Length ? indices[ii] : size; 1117var val = useLog ? (TFloat)Math.Log(values[i]) : values[i]; 1129var ivDst = indices[ii]; 1133var val = useLog ? (TFloat)Math.Log(values[ii]) : values[ii]; 1328bldr.AddFeature(i, BinUtils.GetValue(in values[i], _binUpperBounds[i], _den[i], _offset[i])); 1333bldr.AddFeature(i, BinUtils.GetValue(in values[i], _binUpperBounds[i], _den[i])); 1344int ivSrc = indices[ii]; 1353BinUtils.GetValue(in values[ii], _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); 1354ivSrc = ++ii < values.Length ? indices[ii] : size; 1367int i = indices[ii]; 1369bldr.AddFeature(i, BinUtils.GetValue(in values[ii], _binUpperBounds[i], _den[i])); 1944_values[j].Add(values[j]); 1951var val = values[k]; 1952var j = indices[k]; 2147_medianAggregators[i].ProcessValue(span[i]);
Transforms\NormalizeColumnSng.cs (36)
368var val = values[j]; 378var val = values[k]; 379var j = indices[k]; 480var origVal = values[j]; 489var origVal = values[k]; 490var j = indices[k]; 996bldr.AddFeature(i, values[i] * scale[i]); 1004int i = indices[ii]; 1006bldr.AddFeature(i, values[ii] * scale[i]); 1032bldr.AddFeature(i, (values[i] - offset[i]) * scale[i]); 1039int ivSrc = indices[ii]; 1046bldr.AddFeature(ivDst, (values[ii] - offset[ivDst]) * scale[ivDst]); 1047ivSrc = ++ii < count ? indices[ii] : size; 1078bldr.AddFeature(i, (values[i] - offset[i]) * scale[i]); 1085int ivSrc = indices[ii]; 1092Contracts.Assert(ii < count && ivSrc == indices[ii] || ii == count && ivSrc == size); 1105bldr.AddFeature(ivSrc, values[ii] * scale[ivSrc]); 1106ivSrc = ++ii < count ? indices[ii] : size; 1115bldr.AddFeature(ivDst, (values[ii] - offset[ivDst]) * scale[ivDst]); 1116ivSrc = ++ii < count ? indices[ii] : size; 1278var val = useLog ? (TFloat)Math.Log(values[i]) : values[i]; 1290var ivDst = indices[ii]; 1294var val = useLog ? (TFloat)Math.Log(values[ii]) : values[ii]; 1490bldr.AddFeature(i, BinUtils.GetValue(values[i], _binUpperBounds[i], _den[i], _offset[i])); 1495bldr.AddFeature(i, BinUtils.GetValue(values[i], _binUpperBounds[i], _den[i])); 1506int ivSrc = indices[ii]; 1515BinUtils.GetValue(values[ii], _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); 1516ivSrc = ++ii < count ? indices[ii] : size; 1529int i = indices[ii]; 1531bldr.AddFeature(i, BinUtils.GetValue(values[ii], _binUpperBounds[i], _den[i])); 2108_values[j].Add(values[j]); 2115var val = values[k]; 2116var j = indices[k]; 2309_medianAggregators[i].ProcessValue(span[i]);
Transforms\ValueMapping.cs (1)
926editor.Values[ich] = MapValue(values[ich]);
Transforms\ValueToKeyMappingTransformerImpl.cs (9)
403if (!AccumAndDecrement(in values[i])) 421if (!_addedDefaultFromSparse && valIndices[i] != i) 427if (!AccumAndDecrement(in values[i])) 795stringMapper(in srcValues[i], ref sb); 968map(in values[islot], ref dstItem); 971int slot = !src.IsDense ? indices[islot] : islot; 1006map(in values[slot], ref dstItem); 1022map(in values[islot], ref dstItem); 1025nextExplicitSlot = ++islot == indices.Length ? src.Length : indices[islot];
Utilities\SlotDropper.cs (4)
137editor.Values[iDst++] = srcValues[iSrc++]; 144editor.Values[iDst++] = srcValues[iSrc++]; 176var index = srcIndices[iiSrc]; 181editor.Values[iiDst++] = srcValues[iiSrc++];
Microsoft.ML.DataView (5)
src\Microsoft.ML.Core\Utilities\ArrayUtils.cs (5)
60if (input[mid] >= value) 66Debug.Assert(minCur == min || input[minCur - 1] < value); 67Debug.Assert(limCur == lim || input[limCur] >= value); 70Debug.Assert(minCur == min || input[minCur - 1] < value); 71Debug.Assert(limCur == lim || input[limCur] >= value);
Microsoft.ML.Ensemble (5)
EnsembleUtils.cs (5)
61editor.Values[i] = !includedIndices[i] ? defaultValue : srcValues[i]; 74editor.Values[count] = srcValues[i]; 92if (includedIndices[srcIndices[i]]) 94editor.Values[count] = srcValues[i]; 95editor.Indices[count] = srcIndices[i];
Microsoft.ML.EntryPoints (1)
FeatureCombiner.cs (1)
136sb.AppendMemory(metadataValues[i]);
Microsoft.ML.FastTree (28)
FastTree.cs (12)
1015int ge = Algorithms.FindFirstGE(binUpperBounds, values[i]); 1017result.Add(new KeyValuePair<int, int>(indices[i], ge)); 1233if ((binnedValues[valuesIndices[i]] = Algorithms.FindFirstGE(binUpperBounds, valuesValues[i])) == 0) 1243if (valuesValues[i] == 0) 1246binnedValues[i] = Algorithms.FindFirstGE(binUpperBounds, valuesValues[i]); 1319conv(in srcValues[i], ref editor.Values[i]); 1510if (doubleTempValues[index] <= firstBin) 1513int iindex = doubleTemp.IsDense ? index : doubleTempIndices[index]; 1516if (doubleTempValues[index] != 1 || (last != -1 && last >= iFeature)) 1593int ii = temp.IsDense ? i : tempIndices[i]; 1594var label = tempValues[i];
GamModelParameters.cs (6)
214value += GetBinEffect(j, featuresValues[i]); 224if (_inputFeatureToShapeFunctionMap.TryGetValue(featuresIndices[i], out int j)) 226value += GetBinEffect(j, featuresValues[i]) - GetBinEffect(j, 0); 245value += GetBinEffect(j, featuresValues[i], out bins[j]); 258if (_inputFeatureToShapeFunctionMap.TryGetValue(featuresIndices[i], out int j)) 260value += GetBinEffect(j, featuresValues[i], out bins[j]) - GetBinEffect(j, 0);
TreeEnsemble\InternalRegressionTree.cs (8)
860float fv = GetFeatureValue(nonBinnedInstance[indices], node); 873float fv = GetFeatureValue(nonBinnedInstance[SplitFeatures[node]], node); 893float fv = GetFeatureValue(nonBinnedInstance[index], node); 905float fv = GetFeatureValue(nonBinnedInstance[SplitFeatures[node]], node); 947int index = featIndices[i]; 950float val = GetFeatureValue(featValues[i], node); 967if (ii < count && featIndices[ii] == ifeat) 968val = featValues[ii];
Utils\LinqExtensions.cs (2)
33if (span[i].CompareTo(span[argMax]) > 0)
Microsoft.ML.ImageAnalytics (32)
ImagePixelExtractor.cs (24)
387if (a != -1) { vb[idst + a] = (byte)(alphaIndex > 0 ? pixelData[ix + alphaIndex] : 255); } 388if (r != -1) { vb[idst + r] = pixelData[ix + redIndex]; } 389if (g != -1) { vb[idst + g] = pixelData[ix + greenIndex]; } 390if (b != -1) { vb[idst + b] = pixelData[ix + blueIndex]; } 394if (a != -1) { vf[idst + a] = (byte)(alphaIndex > 0 ? pixelData[ix + alphaIndex] : 255); } 395if (r != -1) { vf[idst + r] = pixelData[ix + redIndex]; } 396if (g != -1) { vf[idst + g] = pixelData[ix + greenIndex]; } 397if (b != -1) { vf[idst + b] = pixelData[ix + blueIndex]; } 401if (a != -1) { vf[idst + a] = ((byte)(alphaIndex > 0 ? pixelData[ix + alphaIndex] : 255) - offset) * scale; } 402if (r != -1) { vf[idst + r] = (pixelData[ix + redIndex] - offset) * scale; } 403if (g != -1) { vf[idst + g] = (pixelData[ix + greenIndex] - offset) * scale; } 404if (b != -1) { vf[idst + b] = (pixelData[ix + blueIndex] - offset) * scale; } 423if (a != -1) vb[idst + cpix * a] = (byte)(alphaIndex > 0 ? pixelData[ix + alphaIndex] : 255); 424if (r != -1) vb[idst + cpix * r] = pixelData[ix + redIndex]; 425if (g != -1) vb[idst + cpix * g] = pixelData[ix + greenIndex]; 426if (b != -1) vb[idst + cpix * b] = pixelData[ix + blueIndex]; 430if (a != -1) vf[idst + cpix * a] = (byte)(alphaIndex > 0 ? pixelData[ix + alphaIndex] : 255); 431if (r != -1) vf[idst + cpix * r] = pixelData[ix + redIndex]; 432if (g != -1) vf[idst + cpix * g] = pixelData[ix + greenIndex]; 433if (b != -1) vf[idst + cpix * b] = pixelData[ix + blueIndex]; 437if (a != -1) vf[idst + cpix * a] = ((byte)(alphaIndex > 0 ? pixelData[ix + alphaIndex] : 255) - offset) * scale; 438if (r != -1) vf[idst + cpix * r] = (pixelData[ix + redIndex] - offset) * scale; 439if (g != -1) vf[idst + cpix * g] = (pixelData[ix + greenIndex] - offset) * scale; 440if (b != -1) vf[idst + cpix * b] = (pixelData[ix + blueIndex] - offset) * scale;
VectorToImageTransform.cs (8)
384alpha = Convert.ToSingle(values[position + a]); 386red = Convert.ToSingle(values[position + r]); 388green = Convert.ToSingle(values[position + g]); 390blue = Convert.ToSingle(values[position + b]); 396if (ex.Alpha) alpha = Convert.ToSingle(values[position + cpix * a]); 397if (ex.Red) red = Convert.ToSingle(values[position + cpix * r]); 398if (ex.Green) green = Convert.ToSingle(values[position + cpix * g]); 399if (ex.Blue) blue = Convert.ToSingle(values[position + cpix * b]);
Microsoft.ML.KMeansClustering (3)
KMeansModelParameters.cs (1)
193writer.Write(values[j]);
KMeansPlusPlusTrainer.cs (2)
1436Contracts.Assert(AlmostEq(reducedStateCacheValues[j], cachedSumCopyValues[j]));
Microsoft.ML.LightGbm (13)
LightGbmTrainerBase.cs (13)
854float fv = cursorFeaturesValues[catMetaData.CategoricalBoudaries[i]]; 861if (cursorFeaturesValues[j] > 0) 898float fv = cursorFeaturesValues[i]; 899int colIdx = cursorFeaturesIndices[i]; 971float fv = featureValues[i]; 995int colIdx = featureIndices[i]; 996float fv = featureValues[i]; 1142features[numElem + i] = featureValues[i]; 1151int slot = indices[i]; 1152float fv = featureValues[i]; 1185float fv = featureValues[i]; 1198int colIdx = featureIndices[i]; 1199float fv = featureValues[i];
Microsoft.ML.Mkl.Components (14)
OlsLinearRegression.cs (14)
242featuresArray[rowOffset * (m - 1) + j] = values[j]; 251for (int k = i; k < indices[j]; ++k) 255featuresArray[rowOffset * (m - 1) + indices[j]] = values[j]; 256i = indices[j] + 1; 327var val = values[i - 1]; 332xtx[ioff++] += val * values[j]; 343int i = fIndices[ii] + 1; 345var val = values[ii]; 350xtx[ioff + fIndices[jj]] += val * values[jj]; 839TValueCheckDecode(weightValues[i - 1], _tValues[i]); 920coeffs[i], _standardErrors[i + 1], _tValues[i + 1], _pValues[i + 1]); 934writer.WriteLine(format, i, name.IsEmpty ? $"f{i}" : name.ToString(), coeffs[i]);
Microsoft.ML.OneDal (4)
OneDalUtils.cs (4)
62featuresList.Add(values[j]); 71for (int k = i; k < indices[j]; ++k) 75featuresList.Add(values[j]); 76i = indices[j] + 1;
Microsoft.ML.OnnxTransformer (1)
OnnxUtils.cs (1)
565stringData[i] = data[i].ToString();
Microsoft.ML.Predictor.Tests (2)
TestTransposer.cs (2)
48retval[(temp.IsDense ? i : tempIndices[i]) * rc + offset] = tempValues[i];
Microsoft.ML.Samples (17)
Dynamic\NgramExtraction.cs (1)
78Console.Write($"'{slots[item.Key]}' - {item.Value} ");
Dynamic\Transforms\Conversion\Hash.cs (2)
87Console.WriteLine($"The original value of the {indices[i]} " + 88$"category is {categoryNames[i]}");
Dynamic\Transforms\Conversion\HashWithOptions.cs (2)
101Console.WriteLine($"The original value of the {indices[i]} " + 102$"category is {categoryNames[i]}");
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (8)
62string pixelString = $"[A = {imageData[i + alphaIndex]}, R = {imageData[i + redIndex]}, G = {imageData[i + greenIndex]}, B = {imageData[i + blueIndex]}]"; 63string grayPixelString = $"[A = {grayImageData[i + alphaIndex1]}, R = {grayImageData[i + redIndex1]}, G = {grayImageData[i + greenIndex1]}, B = {grayImageData[i + blueIndex1]}]";
Dynamic\Transforms\Text\ProduceHashedNgrams.cs (1)
85Console.Write($"{slots[item.Key]} ");
Dynamic\Transforms\Text\ProduceHashedWordBags.cs (1)
86Console.Write($"{slots[item.Key]} ");
Dynamic\Transforms\Text\ProduceNgrams.cs (1)
92Console.Write($"{slots[item.Key]} ");
Dynamic\Transforms\Text\ProduceWordBags.cs (1)
92Console.Write($"{slots[item.Key]} ");
Microsoft.ML.StandardTrainers (50)
Optimizer\SgdOptimizer.cs (20)
410if (xValues[i] != xprevValues[i]) 420int i = xIndices[ii]; 423if (xprevValues[j++] != 0) 427if (xValues[ii] != xprevValues[j++]) 433if (xprevValues[j++] != 0) 443int j = xprevIndices[jj]; 446if (xValues[i++] != 0) 450if (xValues[i++] != xprevValues[jj]) 456if (xValues[i++] != 0) 469int i = xIndices[ii]; 470int j = xprevIndices[jj]; 473if (xValues[ii++] != xprevValues[jj++]) 478if (xValues[ii++] != 0) 483if (xprevValues[jj++] != 0) 490if (xValues[ii++] != 0) 496if (xprevValues[jj++] != 0)
Standard\LogisticRegression\LbfgsPredictorBase.cs (5)
513featuresList.Add(values[j]); 522for (int k = i; k < indices[j]; ++k) 526featuresList.Add(values[j]); 527i = indices[j] + 1; 779var xx = values[i];
Standard\LogisticRegression\LogisticRegression.cs (7)
295if (currentWeightsValues[i] != 0) 367var val = values[wi] * variance; 375hessian[ioff++] += val * values[wj]; 385int i = indices[ii]; 392var val = values[ii] * variance; 398int j = indices[jj]; 404hessian[ioff + wj] += val * values[jj];
Standard\LogisticRegression\MulticlassLogisticRegression.cs (6)
209ReadOnlyMemory<char> value = values[i]; 216var vs = values[i].ToString(); 700if (fwValues[i] != 0) 728if (fwValues[i] != 0) 730ctx.Writer.Write(fwValues[i]); 761if (values[i] != 0)
Standard\ModelStatistics.cs (6)
376int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1; 379var stdError = stdErrorEditor.Values[wi] = coeffStdErrorValues[i]; 397int wi = denseStdError ? i - 1 : stdErrorIndices2[i] - 1; 419int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1; 422var stdError = stdErrorValues[i]; 444int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1;
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (6)
181if (featureValues[i] > 0) 190if (featureValues[i] > 0) 191featureHistogram[cursor.Label][featureIndices[i]] += 1; 617srcValues[iFeature], ref logProb, ref absentFeatureLogProb); 624ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, srcIndices[iFeature], 625srcValues[iFeature], ref logProb, ref absentFeatureLogProb);
Microsoft.ML.TestFrameworkCommon (8)
TestCommon.cs (8)
149var x1 = v1Values[i]; 150var x2 = v2Values[i]; 164int iv1 = v1.IsDense ? iiv1 : iiv1 < v1Indices.Length ? v1Indices[iiv1] : v1.Length; 165int iv2 = v2.IsDense ? iiv2 : iiv2 < v2Indices.Length ? v2Indices[iiv2] : v2.Length; 173x1 = v1Values[iiv1]; 174x2 = v2Values[iiv2]; 181x1 = v1Values[iiv1]; 189x2 = v2Values[iiv2];
Microsoft.ML.Tests (96)
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
606sb.AppendFormat("{0:X4} ", (short)a.Span[ich]);
ImagesTests.cs (93)
222Assert.True(imageData[i + redIndex] == imageData[i + greenIndex] && imageData[i + greenIndex] == imageData[i + blueIndex]); 272Assert.True(imageData[i + redIndex] == imageData[i + greenIndex] && imageData[i + greenIndex] == imageData[i + blueIndex]); 295Assert.True(imageData1[i + redIndex1] == imageData1[i + greenIndex1] && imageData1[i + greenIndex1] == imageData1[i + blueIndex1]); 395Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 396Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 397Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 471croppedImageData[i + redIndex1] == restoredImageData[i + redIndex] && 472croppedImageData[i + greenIndex1] == restoredImageData[i + greenIndex] && 473croppedImageData[i + blueIndex1] == restoredImageData[i + blueIndex]); 546Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 547Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 548Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 621Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 622Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 623Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 696Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 697Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 698Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 772Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 773Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 774Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 847Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 848Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 849Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 923Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 924Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 925Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 997Assert.Equal(restoredImageData[i + redIndex], croppedImageData[i + redIndex1]); 998Assert.Equal(restoredImageData[i + greenIndex], croppedImageData[i + greenIndex1]); 999Assert.Equal(restoredImageData[i + blueIndex], croppedImageData[i + blueIndex1]); 1040(int red, int green, int blue) topLeft = (imageData[redIndex], imageData[greenIndex], imageData[blueIndex]); 1042(int red, int green, int blue) topRight = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1044(int red, int green, int blue) bottomLeft = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1046(int red, int green, int blue) bottomRight = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1048(int red, int green, int blue) middle = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1052(int red, int green, int blue) midTop = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1055(int red, int green, int blue) midBottom = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1058(int red, int green, int blue) leftMid = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]); 1061(int red, int green, int blue) rightMid = (imageData[index + redIndex], imageData[index + greenIndex], imageData[index + blueIndex]);
Transformers\CountTargetEncodingTests.cs (2)
152Assert.Equal(2 * values[label], values1[label]);
Microsoft.ML.TimeSeries (3)
AdaptiveSingularSpectrumSequenceModeler.cs (3)
1523temp = z * sdForecast[i]; 1524upper.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset + temp); 1525lower.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset - temp);
Microsoft.ML.Tokenizers (84)
Model\BPETokenizer.cs (3)
1053current[i] = (byte)byteToUnicodeEncoding.UnicodeToByte[span[i]]; 1203if (Char.IsHighSurrogate(w[i]) && i < w.Length - 1 && Char.IsLowSurrogate(w[i + 1]))
Model\CodeGenTokenizer.cs (1)
1479current[i] = (byte)byteToUnicodeEncoding.UnicodeToByte[span[i]];
Model\EnglishRobertaTokenizer.cs (3)
371if (byteToUnicode.TryGetValue(text[i], out var value)) 683if (byteToUnicode.TryGetValue(text[i], out var value)) 728if (byteToUnicode.TryGetValue(text[i], out var value))
Model\SentencePieceBaseModel.cs (1)
700if (tokenSpan[tokenSpan.Length - 1] == prefixSuffixChar)
Model\SentencePieceBpeModel.cs (6)
213char c = text[i]; 509char c = text[i]; 773char c = text[i]; 1049char c = text[i]; 1139int len = (Char.IsHighSurrogate(text[spanIndex]) && spanIndex < text.Length - 1 && Char.IsLowSurrogate(text[spanIndex + 1])) ? 2 : 1;
Model\SentencePieceUnigramModel.cs (2)
495int mbLen = Helpers.OneCharLen(normalized[startsAt]); 752ids.Insert(IdsIndex, ByteCodeToIdOffset + normalizationSpan[Utf8Index + j]);
Model\Word.cs (2)
311int mappedIndex = mapping[index]; 312int mappedEndIndex = mapping[endIndex - 1] + 1;
Normalizer\SentencePieceNormalizer.cs (7)
111while (startIndex <= endIndex && original[startIndex] == ' ') 116while (endIndex >= startIndex && original[endIndex] == ' ') 160char c = original[startIndex++]; 167while (startIndex <= endIndex && original[startIndex] == ' ') 401if (EscapeWhiteSpaces && sp[n] == ' ') 420normalized[normalizedIndex++] = sp[n]; 426isPrevSpace = sp[sp.Length - 1] == (byte)' ';
RegexGenerator.g.cs (31)
410while ((uint)iteration < (uint)slice.Length && char.IsLetter(slice[iteration])) 436while (iteration1 < 3 && (uint)iteration1 < (uint)slice.Length && char.IsNumber(slice[iteration1])) 471while ((uint)iteration2 < (uint)slice.Length && ((ch = slice[iteration2]) < 128 ? ("쇿\uffff\ufffeﰀ\u0001\u0001"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\0\rd\0\u0002\u0004\u0005\u0003\u0001\0\0\t\n\v\0"))) 509while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 524if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 543while ((uint)iteration5 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration5])) 592while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6])) 836while ((uint)iteration < (uint)slice.Length && char.IsLetter(slice[iteration])) 871while ((uint)iteration1 < (uint)slice.Length && char.IsNumber(slice[iteration1])) 906while ((uint)iteration2 < (uint)slice.Length && ((ch = slice[iteration2]) < 128 ? ("쇿\uffff\ufffeﰀ\u0001\u0001"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\0\rd\0\u0002\u0004\u0005\u0003\u0001\0\0\t\n\v\0"))) 932while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 947if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 966while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 1175while ((uint)iteration < (uint)slice.Length && ((0xFD & (1 << (int)char.GetUnicodeCategory(slice[iteration]))) != 0)) 1205while ((uint)iteration1 < (uint)slice.Length && ((0xFA & (1 << (int)char.GetUnicodeCategory(slice[iteration1]))) != 0)) 1422while ((uint)iteration2 < (uint)slice.Length && ((0xFD & (1 << (int)char.GetUnicodeCategory(slice[iteration2]))) != 0)) 1458while ((uint)iteration3 < (uint)slice.Length && ((0xFA & (1 << (int)char.GetUnicodeCategory(slice[iteration3]))) != 0)) 1640while (iteration4 < 3 && (uint)iteration4 < (uint)slice.Length && char.IsNumber(slice[iteration4])) 1677while ((uint)iteration5 < (uint)slice.Length && ((ch = slice[iteration5]) < 128 ? ("쇿\uffff\ufffeﰀ\u0001\u0001"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\0\rd\0\u0002\u0004\u0005\u0003\u0001\0\0\t\n\v\0"))) 1734while ((uint)iteration7 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration7])) 1792while ((uint)iteration9 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration9])) 1853while ((uint)iteration10 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration10])) 1969while ((uint)iteration < (uint)slice.Length && Utilities.IsWordChar(slice[iteration])) 2093while ((uint)iteration < (uint)slice.Length && Utilities.IsWordChar(slice[iteration])) 2119while ((uint)iteration1 < (uint)slice.Length && ((ch = slice[iteration1]) < 128 ? ("쇿\uffff\ufffeﰀ\u0001砀\u0001"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\0\v\0\u0002\u0004\u0005\u0003\u0001\u0006\t\u0013\0d"))) 2226while ((uint)iteration < (uint)slice.Length && !char.IsWhiteSpace(slice[iteration])) 2261if (char.IsAscii(span[i])) 2268if (!char.IsWhiteSpace(span[i])) 2287if (char.IsAscii(span[i])) 2294if (((0x1FC013F & (1 << (int)char.GetUnicodeCategory(span[i]))) != 0)) 2331(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 :
Utils\BytePairEncoder.cs (10)
102int mappedStartIndex = indexMappingSpan[startIndex]; 103int mappedEndIndex = indexMappingSpan[endIndex]; 107if (finalEndIndex > 0 && indexMappingSpan[finalEndIndex - 1] == mappedEndIndex) 111while (finalEndIndex < indexMappingSpan.Length && indexMappingSpan[finalEndIndex] == mappedEndIndex) 117result[i] = (ranks[mergingBytes.SliceStartEnd(startIndex, endIndex)], mappedStartIndex, indexMappingSpan[finalEndIndex] - mappedStartIndex); 257int mappedStartIndex = indexMappingSpan[startIndex]; 258int mappedEndIndex = indexMappingSpan[endIndex]; 265if (finalEndIndex > 0 && indexMappingSpan[finalEndIndex - 1] == mappedEndIndex) 268while (finalEndIndex < indexMappingSpan.Length && indexMappingSpan[finalEndIndex] == mappedEndIndex) 278resultPoolArray[resultCount++] = (tokenId, mappedStartIndex, indexMappingSpan[finalEndIndex] - mappedStartIndex);
Utils\DoubleArrayTrie.cs (9)
360byte keyLabel = key[keyPos]; 388byte keyLabel = keyPos < length ? key[keyPos] : (byte)0; 1074nodePos ^= key[i]; 1077if (unit.Label != key[i]) 1108id ^= unit.Offset ^ key[keyPos]; 1110if (unit.Label != key[keyPos]) 1120for (; key[keyPos] != 0; ++keyPos) 1122id ^= unit.Offset ^ key[keyPos]; 1124if (unit.Label != key[keyPos])
Utils\Helpers.cs (9)
77uint c = (uint)text[i]; 96if (i < text.Length - 1 && char.IsSurrogatePair((char)c, text[i + 1])) 99uint value = (uint)char.ConvertToUtf32((char)c, text[i + 1]); 170uint c = (uint)text[i]; 189if (i < text.Length - 1 && char.IsSurrogatePair((char)c, text[i + 1])) 192uint value = (uint)char.ConvertToUtf32((char)c, text[i + 1]); 219if (unicodeToByte.TryGetValue(text[i], out char c)) 249byte firstByte = utf8Bytes[byteIndex]; 290byte nextByte = utf8Bytes[byteIndex + i];
Microsoft.ML.Tokenizers.Tests (22)
NormalizerTests.cs (2)
104sb.Append(original[i]); 120sb.Append(original[i]);
PreTokenizerTests.cs (2)
90while (index < text.Length && char.IsWhiteSpace(text[index])) 96while (end < text.Length && !char.IsWhiteSpace(text[end]))
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (9)
360byte keyLabel = key[keyPos]; 388byte keyLabel = keyPos < length ? key[keyPos] : (byte)0; 1074nodePos ^= key[i]; 1077if (unit.Label != key[i]) 1108id ^= unit.Offset ^ key[keyPos]; 1110if (unit.Label != key[keyPos]) 1120for (; key[keyPos] != 0; ++keyPos) 1122id ^= unit.Offset ^ key[keyPos]; 1124if (unit.Label != key[keyPos])
src\Microsoft.ML.Tokenizers\Utils\Helpers.cs (9)
77uint c = (uint)text[i]; 96if (i < text.Length - 1 && char.IsSurrogatePair((char)c, text[i + 1])) 99uint value = (uint)char.ConvertToUtf32((char)c, text[i + 1]); 170uint c = (uint)text[i]; 189if (i < text.Length - 1 && char.IsSurrogatePair((char)c, text[i + 1])) 192uint value = (uint)char.ConvertToUtf32((char)c, text[i + 1]); 219if (unicodeToByte.TryGetValue(text[i], out char c)) 249byte firstByte = utf8Bytes[byteIndex]; 290byte nextByte = utf8Bytes[byteIndex + i];
Microsoft.ML.TorchSharp (13)
AutoFormerV2\ObjectDetectionMetrics.cs (8)
326obj.Left = boxes[boxIdx++]; 327obj.Top = boxes[boxIdx++]; 328obj.Width = (boxes[boxIdx++] - obj.Left + 1); 329obj.Height = (boxes[boxIdx++] - obj.Top + 1); 368obj.Left = boxes[boxIdx++]; 369obj.Top = boxes[boxIdx++]; 370obj.Width = (boxes[boxIdx++] - obj.Left + 1); 371obj.Height = (boxes[boxIdx++] - obj.Top + 1);
AutoFormerV2\ObjectDetectionTrainer.cs (5)
404long x0 = (long)boxValues[b++]; 405long y0 = (long)boxValues[b++]; 406long x1 = (long)boxValues[b++]; 407long y1 = (long)boxValues[b++]; 409long cl = labelValues[i] - 1;
Microsoft.ML.Transforms (102)
Dracula\CountTableTransformer.cs (9)
287builder.IncrementSlot(iCol, i, values[i], labelKey); 292builder.IncrementSlot(iCol, indices[i], values[i], labelKey); 663editor.Values[i * nFeatures + j] = $"{slotName}_{featureNamesValues[j]}".AsMemory(); 682Host.Assert(_parent.Featurizer.SlotCount[iinfo] == 1); 701Host.Assert(_parent.Featurizer.SlotCount[iinfo] == n); 715_parent.Featurizer.GetFeatures(iinfo, i, rand, srcValues[i], editor.Values.Slice(i * outputLength, outputLength)); 724var index = srcIndices[i]; 725_parent.Featurizer.GetFeatures(iinfo, index, rand, srcValues[i], editor.Values.Slice(index * outputLength, outputLength));
Dracula\Featurizer.cs (4)
200if (counts[i] <= 0 && countTable.PriorFrequencies[i] <= 0 || countTable.PriorFrequencies[i] >= 1) 205(counts[i] + PriorCoef[iCol] * countTable.PriorFrequencies[i]) / 206(sum - counts[i] + PriorCoef[iCol] * (1 - countTable.PriorFrequencies[i])));
HashJoiningTransform.cs (1)
445outputSlotName.Append(srcSlotNameValues[inputSlotIndex]);
LearnerFeatureSelection.cs (9)
147var score = Math.Abs(scoresValues[i]); 163score = Math.Abs(scoresValues[i]); 194range.min = min == 0 ? 0 : scoresIndices[min - 1] + 1; 195range.max = max == scoresIndices.Length - 1 ? scores.Length - 1 : scoresIndices[max + 1] - 1; 200var gapMin = ii == 0 ? 0 : scoresIndices[ii - 1] + 1; 201var gapMax = scoresIndices[ii] - 1; 213var gapMin = ii == 0 ? 0 : scoresIndices[ii - 1] + 1; 214var gapMax = ii == scoresIndices.Length ? scores.Length - 1 : scoresIndices[ii] - 1; 238var score = Math.Abs(scores[i]);
MissingValueDroppingTransformer.cs (9)
261if (!isNA(in srcValues[i])) 289if (!isNA(in srcValues[i])) 290editor.Values[iDst++] = srcValues[i]; 305if (!isNA(in srcValues[i])) 328if (!isNA(in srcValues[i])) 330editor.Values[iDst] = srcValues[i]; 346if (!isNA(in srcValues[i])) 348editor.Values[iDst] = srcValues[i]; 349editor.Indices[iDst] = srcIndices[i] - offset;
MissingValueIndicatorTransform.cs (3)
309var val = values[ivSrc]; 334var val = values[iivSrc]; 337int iv = indices[iivSrc];
MissingValueIndicatorTransformer.cs (5)
312if (isNA(in srcValues[i])) 322if (isNA(in srcValues[ii])) 323indices.Add(srcIndices[ii]); 333if (!isNA(in srcValues[ii])) 334indices.Add(srcIndices[ii]);
MissingValueReplacing.cs (7)
263if (defaultPred(in srcValues[slot])) 729var srcVal = srcValues[ivSrc]; 751var srcVal = srcValues[iivSrc]; 752int iv = srcIndices[iivSrc]; 803var srcVal = srcValues[ivSrc]; 825var srcVal = srcValues[iivSrc]; 826int iv = srcIndices[iivSrc];
MissingValueReplacingUtils.cs (4)
224ProcessValue(in srcValues[slot]); 250ProcessValue(in srcValues[slot], slot); 257ProcessValue(in srcValues[islot], srcIndices[islot]);
MutualInformationFeatureSelection.cs (8)
735var label = labelsValues[i]; 736var feature = featureValues[i] - offset; 748var label = labelsValues[i]; 750if (ii == featureIndices.Length || i < featureIndices[ii]) 754feature = featureValues[ii] - offset; 821var val = inputValues[i]; 847var val = inputValues[i]; 897TSrc val = inputValues[i];
SvmLight\SvmLightLoader.cs (5)
309if (Conversions.DefaultInstance.TryParse(in inputValues[i], out uint index)) 318throw Contracts.Except($"Encountered non-parsable index '{inputValues[i]}' while parsing dataset"); 379var key = keysValues[i]; 384_bldr.AddFeature((int)key - 1, valuesValues[i]); 694if (!parser(in values[i], out var val) || val > int.MaxValue)
Text\LdaSingleBox.cs (4)
205pVal[i] = (int)termVal[i]; 220pVal[i] = (int)termVal[i]; 270pVal[i] = (int)termVal[i]; 299pVal[i] = (int)termVal[i];
Text\LdaTransform.cs (3)
428int termFreq = GetFrequency(inputValues[i]); 496int termFreq = GetFrequency(srcValues[i]); 886int termFreq = GetFrequency(srcValues[termID]);
Text\NgramUtils.cs (3)
81curKey = srcValues[i]; 100if (iindex < srcIndices.Length && i == srcIndices[iindex]) 102curKey = srcValues[iindex];
Text\StopWordsRemovingTransformer.cs (6)
428if (srcValues[i].IsEmpty) 431ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(srcValues[i].Span, buffer); 435list.Add(srcValues[i]); 1116if (srcValues[i].IsEmpty) 1119ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(srcValues[i].Span, buffer); 1123list.Add(srcValues[i]);
Text\TextNormalizing.cs (3)
374NormalizeSrc(in srcValues[i], ref temp, buffer); 400char ch = span[i]; 429if (ch != src.Span[i])
Text\TokenizingByCharacters.cs (13)
494editor.Values[index++] = span[ich]; 522if (!srcValues[i].IsEmpty) 524len += srcValues[i].Length; 536if (srcValues[i].IsEmpty) 540var span = srcValues[i].Span; 541for (int ich = 0; ich < srcValues[i].Length; ich++) 542editor.Values[index++] = span[ich]; 561if (!srcValues[i].IsEmpty) 563len += srcValues[i].Length; 589if (srcValues[i].IsEmpty) 595var span = srcValues[i].Span; 596for (int ich = 0; ich < srcValues[i].Length; ich++) 597editor.Values[index++] = span[ich];
Text\WordEmbeddingsExtractor.cs (1)
581if (_parent._currentVocab.GetWordVector(in srcValues[word], wordVector))
Text\WordTokenizing.cs (1)
294AddTerms(srcValues[i], separators, terms);
UngroupTransform.cs (4)
657value = rowValues[_pivotColPosition]; 662while (cachedIndex < rowIndices.Length && _pivotColPosition > rowIndices[cachedIndex]) 665if (cachedIndex < rowIndices.Length && _pivotColPosition == rowIndices[cachedIndex]) 666value = rowValues[cachedIndex];
Microsoft.NET.Build.Containers (2)
_generated\0\RegexGenerator.g.cs (2)
111while ((uint)prev < (uint)slice.Length && Utilities.IsWordChar(slice[prev])) 265(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 :
Microsoft.NET.HostModel (3)
AppHost\BinaryUtils.cs (3)
111if (pattern[pos - 1] == pattern[cnd]) 139if (pattern[i] == bytes[m + i])
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (5)
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAssetPathPattern.cs (5)
130(current.Span[tokenEnd + 1] == PatternOptional || current.Span[tokenEnd + 1] == PatternPreferred || current.Span[tokenEnd + 1] == PatternPackOnly)) 132if (current.Span[tokenEnd + 1] == PatternPackOnly) 141if (current.Span[tokenEnd + 1] == PatternPreferred)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
Data\StaticWebAssetPathPattern.cs (5)
130(current.Span[tokenEnd + 1] == PatternOptional || current.Span[tokenEnd + 1] == PatternPreferred || current.Span[tokenEnd + 1] == PatternPackOnly)) 132if (current.Span[tokenEnd + 1] == PatternPackOnly) 141if (current.Span[tokenEnd + 1] == PatternPreferred)
Utils\Globbing\StaticWebAssetGlobMatcherBuilder.cs (1)
152Kind = segmentSpan[variableIndex] == '*' ? GlobSegmentPartKind.WildCard : GlobSegmentPartKind.QuestionMark,
Microsoft.NET.StringTools (6)
SpanBasedStringBuilder.cs (6)
55return span.Span[_charIndex]; 137return span.Span[adjustedIndex]; 272while (i < span.Length && char.IsWhiteSpace(span[i])) 294while (i < span.Length && span[i] == c) 319while (i >= 0 && char.IsWhiteSpace(span[i])) 341while (i >= 0 && span[i] == c)
Microsoft.Private.Windows.Core (5)
System\IO\Compression\RunLengthEncoder.cs (1)
46length += encoded[i];
Windows\Win32\Graphics\Gdi\ARGB.cs (1)
50colors[i] = argbColors[i];
Windows\Win32\System\Com\SAFEARRAY.cs (3)
87dimensionSize *= bounds[boundIndex--].cElements; 89int diff = (indices[indicesIndex++] - bounds[boundIndex].lLbound); 93cell += (uint)(c1 - bounds[cDims - 1].lLbound);
Microsoft.SourceLink.AzureDevOpsServer.Git (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.AzureRepos.Git (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.Bitbucket.Git (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.Common (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.Gitea (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.Gitee (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.GitHub (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.GitLab (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.SourceLink.GitWeb (2)
src\sourcelink\src\Common\Utilities\Hash.cs (2)
230var b = data[i]; 412hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
Microsoft.Win32.Registry (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
PresentationBuildTasks (4)
MS\Internal\MarkupCompiler\PathInternal.cs (4)
214while (i < pathLength && (!IsDirectorySeparator(path[i]) || --n > 0)) 228while (i < pathLength && !IsDirectorySeparator(path[i])) 233if (i < pathLength && i > DevicePrefixLength && IsDirectorySeparator(path[i])) 339=> path.Length > 0 && PathInternal.IsDirectorySeparator(path[path.Length - 1]);
PresentationCore (11)
MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (1)
51if(sumSq > DefaultFirstSquareRoot[i])
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
2098if ((byte)data.ReadByte() != Base64HeaderBytes[x])
MS\Internal\Shaping\Positioning.cs (1)
227return (ushort)(BitCount[Format & 0x000F] + BitCount[(Format >> 4) & 0x000F]);
System\Windows\Input\InputProcessorProfiles.cs (1)
116langArray[i] = new CultureInfo(languageIDs[i]);
System\Windows\Input\MouseDevice.cs (6)
1752if ((rawMouseInputReport.Actions & ButtonPressActions[iButton]) == ButtonPressActions[iButton]) 1754actions |= ButtonPressActions[iButton]; 1760if ((rawMouseInputReport.Actions & ButtonReleaseActions[iButton]) == ButtonReleaseActions[iButton]) 1762actions |= ButtonReleaseActions[iButton];
System\Windows\PresentationSource.cs (1)
579if (baseSource != CriticalFromVisual(visuals[i]))
PresentationFramework (26)
MS\Internal\Commands\CommandHelpers.cs (1)
106CommandManager.RegisterClassInputBinding(controlType, new InputBinding(command, inputGestures[i]));
MS\Internal\Globalization\BamlResourceContent.cs (4)
108if (contentSpan[i] == BamlConst.EscapeChar) // An escape token ('\') 113stringBuilder.Append(contentSpan[i]); 118else if (contentSpan[i] == '&') // A known escape sequence shall follow 123stringBuilder.Append(contentSpan[i]);
MS\Internal\PtsHost\ListMarkerSourceInfo.cs (5)
251Invariant.Assert(highestIndex >= RomanNumericSizeIncrements[i]); 252if (highestIndex == RomanNumericSizeIncrements[i]) 260Invariant.Assert(highestIndex > RomanNumericSizeIncrements[i]); 263if (highestIndex >= RomanNumericSizeIncrements[i + 1]) 273largestIndex = RomanNumericSizeIncrements[i];
MS\Internal\TraceData.cs (1)
94object objectParam = parameters[i];
System\Windows\Controls\DataGridRow.cs (2)
221byte stateCode = IdealStateMapping[idealStateMappingIndex]; 249stateCode = FallbackStateMapping[stateCode];
System\Windows\Controls\DocumentViewer.cs (4)
1118Zoom = ZoomLevelCollection[_zoomLevelIndex]; 1136if ((oldZoom == ZoomLevelCollection[_zoomLevelIndex]) && 1145Zoom = ZoomLevelCollection[_zoomLevelIndex]; 2247if (currentZoom >= ZoomLevelCollection[loopIndex])
System\Windows\Controls\Primitives\DataGridRowHeader.cs (2)
487byte stateCode = IdealStateMapping[idealStateMappingIndex]; 501stateCode = FallbackStateMapping[stateCode];
System\Windows\Documents\Glyphs.cs (1)
400if (!Char.IsWhiteSpace(valueSpec[i]))
System\Windows\Documents\XamlToRtfWriter.cs (4)
3552while (n >= 0 && (s[n] < '0' || s[n] > '9') && s[n] != '.') 3818while (e < thickness.Length && thickness[e] != ',')
System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (1)
373char ch = value[i];
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1642char c = ns[i];
RepoTasks (2)
_generated\0\RegexGenerator.g.cs (2)
175while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 577if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
Roslyn.Diagnostics.Analyzers (27)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
841if (IsAnyDirectorySeparator(path[i])) 851sb.Append(path[i]);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
237byte b = data[i]; 301hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 405hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (2)
534RoslynDebug.Assert((ascii[i] & 0x80) == 0, $"The {nameof(ascii)} input to this method must be valid ASCII."); 545if (ascii[i] != text[i])
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
125if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 147if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (9)
47var firstChar = identifier[wordStart]; 87var c = identifier[current]; 109var c = identifier[current]; 119while (current < length && char.IsUpper(identifier[current])) 124if (current < length && IsLower(identifier[current])) 127Debug.Assert(char.IsUpper(identifier[current - 1])); 154while (current < length && IsLower(identifier[current])) 165while (current < length && char.IsDigit(identifier[current])) 177var ch = identifier[wordStart];
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
312var name = IdentifierName(names[i]);
Shared (2)
ServerSentEvents\SseFormatter.cs (2)
156if (data[i++] == '\r' && i < data.Length && data[i] == '\n')
System.Collections (2)
System\Collections\Generic\PriorityQueue.cs (2)
889if (EqualityComparer<TElement>.Default.Equals(element, nodes[i].Element)) 899if (equalityComparer.Equals(element, nodes[i].Element))
System.Collections.Immutable (11)
System\Collections\Frozen\FrozenHashTable.cs (4)
199while ((uint)minPrimeIndexInclusive < (uint)primes.Length && minNumBuckets > primes[minPrimeIndexInclusive]) 217while ((uint)maxPrimeIndexExclusive < (uint)primes.Length && maxNumBuckets > primes[maxPrimeIndexExclusive]) 225maxNumBuckets = primes[maxPrimeIndexExclusive - 1]; 240numBuckets = primes[primeIndex];
System\Collections\Frozen\String\OrdinalStringFrozenDictionary_LeftJustifiedSingleChar.cs (1)
27private protected override int GetHashCode(ReadOnlySpan<char> s) => s[HashIndex];
System\Collections\Frozen\String\OrdinalStringFrozenDictionary_RightJustifiedSingleChar.cs (1)
27private protected override int GetHashCode(ReadOnlySpan<char> s) => s[s.Length + HashIndex];
System\Collections\Frozen\String\OrdinalStringFrozenSet_LeftJustifiedSingleChar.cs (1)
24private protected override int GetHashCode(ReadOnlySpan<char> s) => s[HashIndex];
System\Collections\Frozen\String\OrdinalStringFrozenSet_RightJustifiedSingleChar.cs (1)
24private protected override int GetHashCode(ReadOnlySpan<char> s) => s[s.Length + HashIndex];
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
454elements[i] = items[i];
System\Collections\Immutable\ImmutableList_1.Node.cs (1)
277return new Node(items[leftCount], left, right, frozen: true);
System\Collections\Immutable\ImmutableQueue.cs (1)
97forwards = forwards.Push(items[i]);
System.CommandLine (6)
Parsing\CommandLineParser.cs (1)
53var c = memory.Span[pos];
Parsing\StringExtensions.cs (5)
213if (alias[i] == ':' || alias[i] == '=') 219candidate[1] = alias[i]; 236if (alias[index] == ':' || alias[index] == '=')
System.Configuration.ConfigurationManager (6)
src\runtime\src\libraries\Common\src\System\Security\IdentityHelper.cs (6)
100sb.Append((char)base32Chars[b0 & 0x1F]); 101sb.Append((char)base32Chars[b1 & 0x1F]); 102sb.Append((char)base32Chars[b2 & 0x1F]); 103sb.Append((char)base32Chars[b3 & 0x1F]); 104sb.Append((char)base32Chars[b4 & 0x1F]); 126sb.Append((char)base32Chars[b2]);
System.Console (14)
System\ConsolePal.Unix.cs (2)
630byte b = source[i]; 839int ansiCode = consoleColorToAnsiCode[ccValue] % maxColors;
System\IO\KeyParser.cs (12)
117int digitCount = !char.IsBetween(input[SequencePrefixLength], '1', '9') // not using IsAsciiDigit as 0 is invalid 119: char.IsDigit(input[SequencePrefixLength + 1]) ? 2 : 1; 128if (IsSequenceEndTag(input[SequencePrefixLength + digitCount])) 140if (IsRxvtModifier(input[SequencePrefixLength + digitCount])) 142modifiers = MapRxvtModifiers(input[SequencePrefixLength + digitCount]); 154if (input[SequencePrefixLength + digitCount] is not ModifierSeparator 156|| !char.IsBetween(input[SequencePrefixLength + digitCount + 1], '2', '8') 157|| (!char.IsAsciiLetterUpper(input[SequencePrefixLength + digitCount + 2]) && input[SequencePrefixLength + digitCount + 2] is not VtSequenceEndTag)) 162modifiers = MapXtermModifiers(input[SequencePrefixLength + digitCount + 1]); 164key = input[SequencePrefixLength + digitCount + 2] is VtSequenceEndTag 166: MapKeyIdOXterm(input[SequencePrefixLength + digitCount + 2], terminalFormatStrings.IsRxvtTerm).key;
System.Data.Common (39)
_generated\0\RegexGenerator.g.cs (5)
195while ((uint)iteration < (uint)slice.Length && (char.GetUnicodeCategory(slice[iteration]) != UnicodeCategory.Control)) 241if ((uint)(pos - 1) >= inputSpan.Length || !char.IsWhiteSpace(inputSpan[pos - 1])) 257if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 348while ((uint)iteration < (uint)slice.Length && ((ch = slice[iteration]) < 128 ? ("\0\0コ\ud7ff\uffff\uffff\uffff翿"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\b\u0002\"#'(;<=>d\u000f"))) 358if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
System\Data\Filter\Operators.cs (1)
142return (uint)op < (uint)priorities.Length ? priorities[op] : PriMax;
System\Data\SQLTypes\SQLDateTime.cs (3)
116if (day >= 1 && day <= days[month] - days[month - 1]) 119int dayticks = y * 365 + y / 4 - y / 100 + y / 400 + days[month - 1] + day - 1;
System\Data\SQLTypes\SQLDecimal.cs (28)
353if (decimalPart < decimalHelpers[tableIndex]) 356if (decimalPart < decimalHelpers[tableIndex]) 359if (decimalPart < decimalHelpers[tableIndex]) 376if (decimalPart < decimalHelpers[tableIndex]) 385if (decimalPart >= decimalHelpers[tableIndex]) 388if (tableIndex == 37 && decimalPart >= decimalHelpers[tableIndex]) 437if (_data4 < DecimalHelpersHiHi[tableIndex]) 441else if (_data4 == DecimalHelpersHiHi[tableIndex]) 443if (_data3 < DecimalHelpersHi[tableIndex]) 447else if (_data3 == DecimalHelpersHi[tableIndex]) 449if (_data2 < DecimalHelpersMid[tableIndex]) 453else if (_data2 == DecimalHelpersMid[tableIndex]) 455if (_data1 < DecimalHelpersLo[tableIndex]) 1496ulPlier = rglData1[iulPlier]; 1509ulong ulTemp = rglData2[iulCand]; 1827if (rglData[_bLen - 1] == 0) 1834Debug.Assert(rglData[iulData] == 0, "rglData[iulData] == 0", "In AssertValid"); 1921return RgCLenFromPrec[bPrec - 1]; 2321ulShiftBase = RgulShiftBase[lAdjust - 1]; 2450if (rglData1[iData] != rglData2[iData]) 2451return ((rglData1[iData] > rglData2[iData]) ? 1 : -1); 2475rgulD[i] = rgulS[i]; 2497while (ciulU > 1 && rgulU[ciulU - 1] == 0) 3068ulRem = DivByULong(RgulShiftBase[iAdjust - 1]); 3207ulRem = n.DivByULong(RgulShiftBase[lAdjust - 1]); 3208ulLastDivBase = RgulShiftBase[lAdjust - 1];
System\Data\SQLTypes\SQLGuid.cs (2)
132byte b1 = xBytes[rgiGuidOrder[i]]; 133byte b2 = yBytes[rgiGuidOrder[i]];
System.Data.Odbc (5)
_generated\1\RegexGenerator.g.cs (5)
195while ((uint)iteration < (uint)slice.Length && (char.GetUnicodeCategory(slice[iteration]) != UnicodeCategory.Control)) 241if ((uint)(pos - 1) >= inputSpan.Length || !char.IsWhiteSpace(inputSpan[pos - 1])) 257if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 348while ((uint)iteration < (uint)slice.Length && ((ch = slice[iteration]) < 128 ? ("\0\0コ\ud7ff\uffff\uffff\uffff翿"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\b\u0002\"#'(;<=>d\u000f"))) 358if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
System.Data.OleDb (5)
_generated\4\RegexGenerator.g.cs (5)
195while ((uint)iteration < (uint)slice.Length && (char.GetUnicodeCategory(slice[iteration]) != UnicodeCategory.Control)) 241if ((uint)(pos - 1) >= inputSpan.Length || !char.IsWhiteSpace(inputSpan[pos - 1])) 257if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')) 348while ((uint)iteration < (uint)slice.Length && ((ch = slice[iteration]) < 128 ? ("\0\0コ\ud7ff\uffff\uffff\uffff翿"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\u0001\b\u0002\"#'(;<=>d\u000f"))) 358if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
System.Diagnostics.DiagnosticSource (31)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Diagnostics\Activity.cs (2)
2089outBytes[i] = HexByteFromChars(charData[i * 2], charData[i * 2 + 1]);
System\Diagnostics\DsesSamplerBuilder.cs (1)
62result |= bytes[i] & 0xff;
System\Diagnostics\Metrics\AggregatorStore.cs (3)
401valueFetches[i] = new LabelInstruction(i, labels[i].Key); 456if (instr.LabelName != labels[instr.SourceIndex].Key) 460indexedValues[i] = labels[instr.SourceIndex].Value;
System\Diagnostics\Metrics\RuntimeMetrics.cs (2)
191yield return new(gcInfo.GenerationInfo[i].SizeAfterBytes, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[i])); 201yield return new(gcInfo.GenerationInfo[i].FragmentationAfterBytes, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[i]));
System\Diagnostics\Metrics\TagList.netcore.cs (4)
286if (item.Key == tags[i].Key && item.Value.Equals(tags[i].Value)) 296if (item.Key == tags[i].Key && tags[i].Value is null)
System\Diagnostics\W3CPropagator.cs (11)
305char c = valueSpan[i]; 332if (i + 5 >= valueSpan.Length || valueSpan[i + 3] != Percent || !TryDecodeEscapedByte(valueSpan.Slice(i + 3), out byte b1) || (b1 & 0xC0) != 0x80) 349valueSpan[i + 3] != Percent || 350valueSpan[i + 6] != Percent || 370valueSpan[i + 3] != Percent || 371valueSpan[i + 6] != Percent || 372valueSpan[i + 9] != Percent || 465value.IsEmpty || value.Length > MaxTraceStateValueLength || value[value.Length - 1] == Space || 519char c = value[i]; 543if (i < value.Length - 1 && char.IsSurrogatePair(c, value[i + 1])) 546uint v = (uint)char.ConvertToUtf32(c, value[i + 1]);
System.Diagnostics.EventLog (4)
_generated\0\LibraryImports.g.cs (4)
1385__valuePaths_native__nativeSpan____i0_exactType = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(__valuePaths_native__managedSpan[__i0]); 1420ushort* __valuePaths_native__nativeSpan____i0_exactType = (ushort*)__valuePaths_native__nativeSpan[__i0]; 1573__values_native__nativeSpan[__i0] = global::Microsoft.Win32.UnsafeNativeMethods.EvtStringVariant.Marshaller.ConvertToUnmanaged(__values_native__managedSpan[__i0]); 1610global::Microsoft.Win32.UnsafeNativeMethods.EvtStringVariant.Marshaller.Free(__values_native__nativeSpan[__i0]);
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.Unix.cs (1)
236char c = s[index];
System.Diagnostics.PerformanceCounter (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
System.Drawing.Common (21)
System\Drawing\Imaging\ImageAttributes.cs (4)
365buffer[i] = (map[i].OldColor, map[i].NewColor); 390buffer[i] = (map[i].OldColor, map[i].NewColor);
System\Drawing\Imaging\ImageCodecInfo.cs (16)
87int signatureCount = (int)codecInfo[i].SigCount; 91Clsid = codecInfo[i].Clsid, 92FormatID = codecInfo[i].FormatID, 93CodecName = codecInfo[i].CodecName.ToString(), 94DllName = codecInfo[i].DllName.ToString(), 95FormatDescription = codecInfo[i].FormatDescription.ToString(), 96FilenameExtension = codecInfo[i].FilenameExtension.ToString(), 97MimeType = codecInfo[i].MimeType.ToString(), 98Flags = (ImageCodecFlags)codecInfo[i].Flags, 99Version = (int)codecInfo[i].Version, 107codec.SignaturePatterns[j] = new ReadOnlySpan<byte>(codecInfo[i].SigPattern + j * codecInfo[i].SigSize, (int)codecInfo[i].SigSize).ToArray(); 108codec.SignatureMasks[j] = new ReadOnlySpan<byte>(codecInfo[i].SigMask + j * codecInfo[i].SigSize, (int)codecInfo[i].SigSize).ToArray();
System\Drawing\Printing\PrinterSettings.cs (1)
175array[i] = new string(info[i].pPrinterName);
System.Drawing.Primitives (3)
System\Drawing\KnownColorTable.cs (3)
483if (ColorKindTable[index] == KnownColorKindWeb && colorValueTable[index] == argb) 509return AlternateSystemColors[index];
System.Formats.Asn1 (20)
System\Formats\Asn1\Asn1Tag.cs (2)
168byte first = source[bytesConsumed]; 190current = source[bytesConsumed];
System\Formats\Asn1\AsnCharacterStringEncodings.cs (3)
220char c = chars[i]; 248byte b = bytes[i]; 289char c = chars[i];
System\Formats\Asn1\AsnDecoder.BitString.cs (2)
82if (localValue.Length == 0 || normalizedLastByte == localValue[localValue.Length - 1]) 378byte lastByte = source[source.Length - 1];
System\Formats\Asn1\AsnDecoder.cs (2)
338byte lengthOrLengthLength = source[bytesRead]; 398byte current = source[bytesRead];
System\Formats\Asn1\AsnDecoder.Integer.cs (2)
456accum |= contents[i]; 509accum |= contents[i];
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (2)
235byte lastByte = valueSpan[bytesWritten - 1]; 375byte byteVal = valueSpan[byteIdx];
System\Formats\Asn1\AsnDecoder.Oid.cs (3)
137bool endOfIdentifier = (source[idx] & 0x80) == 0; 160byte cur = source[idx]; 189byte cur = source[idx];
System\Formats\Asn1\AsnWriter.BitString.cs (1)
62byte lastByte = bitString.IsEmpty ? (byte)0 : bitString[bitString.Length - 1];
System\Formats\Asn1\AsnWriter.Oid.cs (1)
171value += AtoI(oidValue[position]);
System\Formats\Asn1\SetOfValueComparer.cs (2)
25return (int)x[diffIndex] - y[diffIndex];
System.Formats.Cbor (3)
System\Formats\Cbor\Reader\CborReader.cs (1)
162var nextByte = new CborInitialByte(_data.Span[_offset]);
System\Formats\Cbor\Reader\CborReader.PeekState.cs (1)
59var initialByte = new CborInitialByte(_data.Span[_offset]);
System\Formats\Cbor\Reader\CborReader.Simple.cs (1)
169byte value = _data.Span[_offset + 1];
System.Formats.Nrbf (1)
System\Formats\Nrbf\ArrayRectangularPrimitiveRecord.cs (1)
63if (indices[dimension] < Lengths[dimension])
System.Formats.Tar (11)
src\runtime\src\libraries\Common\src\System\IO\PathInternal.cs (9)
127if (IsDirectorySeparator(path[skip - 1])) 140char c = path[i]; 146if (IsDirectorySeparator(path[i + 1])) 153if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 154path[i + 1] == '.') 163(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 164path[i + 1] == '.' && path[i + 2] == '.') 205sb.Append(path[rootLength - 1]);
System\Formats\Tar\TarHeader.Read.cs (1)
371typeFlag: (TarEntryType)buffer[FieldLocations.TypeFlag])
System\Formats\Tar\TarHeader.Write.cs (1)
849checksum += bytes[i];
System.IO.Compression (12)
System\IO\Compression\DeflateManaged\InflaterManaged.cs (6)
402_extraBits = ExtraLengthBits[symbol]; 424_length = LengthBase[_length] + bits; 441_distanceCode = StaticDistanceTreeTable[_distanceCode]; 466offset = DistanceBasePosition[_distanceCode] + bits; 554_codeLengthTreeCodeLength[CodeOrder[_loopCounter]] = (byte)bits; 560_codeLengthTreeCodeLength[CodeOrder[i]] = 0;
System\IO\Compression\WinZipAesStream.cs (1)
331dest[i] ^= src[i];
System\IO\Compression\ZipBlocks.cs (2)
915VersionMadeBySpecification = buffer[FieldLocations.VersionMadeBySpecification], 916VersionMadeByCompatibility = buffer[FieldLocations.VersionMadeByCompatibility],
System\IO\Compression\ZipCryptoStream.cs (2)
331byte p = buffer[i]; 443byte p = chunk[i];
System\IO\Compression\Zstandard\ZstandardDictionary.cs (1)
115int length = sampleLengths[i];
System.IO.FileSystem.AccessControl (13)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
src\runtime\src\libraries\Common\src\System\IO\PathInternal.cs (9)
127if (IsDirectorySeparator(path[skip - 1])) 140char c = path[i]; 146if (IsDirectorySeparator(path[i + 1])) 153if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 154path[i + 1] == '.') 163(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 164path[i + 1] == '.' && path[i + 2] == '.') 205sb.Append(path[rootLength - 1]);
src\runtime\src\libraries\Common\src\System\IO\PathInternal.Windows.cs (3)
201while (i < pathLength && (!IsDirectorySeparator(path[i]) || --n > 0)) 215while (i < pathLength && !IsDirectorySeparator(path[i])) 220if (i < pathLength && i > DevicePrefixLength && IsDirectorySeparator(path[i]))
System.IO.FileSystem.Watcher (9)
src\runtime\src\libraries\Common\src\System\IO\PathInternal.cs (9)
127if (IsDirectorySeparator(path[skip - 1])) 140char c = path[i]; 146if (IsDirectorySeparator(path[i + 1])) 153if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 154path[i + 1] == '.') 163(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 164path[i + 1] == '.' && path[i + 2] == '.') 205sb.Append(path[rootLength - 1]);
System.IO.Hashing (5)
System\IO\Hashing\Crc32ParameterSet.WellKnown.cs (3)
128crc = crcLookup[idx] ^ (crc >> 8); 151crc = System.Runtime.Intrinsics.Arm.Crc32.ComputeCrc32(crc, source[i]); 173crc = System.Runtime.Intrinsics.Arm.Crc32.ComputeCrc32(crc, source[i]);
System\IO\Hashing\XxHash32.State.cs (1)
87uint lane = remaining[i];
System\IO\Hashing\XxHash64.State.cs (1)
135ulong lane = remaining[i];
System.IO.IsolatedStorage (6)
src\runtime\src\libraries\Common\src\System\Security\IdentityHelper.cs (6)
100sb.Append((char)base32Chars[b0 & 0x1F]); 101sb.Append((char)base32Chars[b1 & 0x1F]); 102sb.Append((char)base32Chars[b2 & 0x1F]); 103sb.Append((char)base32Chars[b3 & 0x1F]); 104sb.Append((char)base32Chars[b4 & 0x1F]); 126sb.Append((char)base32Chars[b2]);
System.IO.Packaging (7)
System\IO\Packaging\ContentType.cs (7)
356if (s[startIndex] != '"') 391if (s[length - 1] != '\\') 462if (IsLinearWhiteSpaceChar(quotedText[i])) 465if (quotedText[i] <= ' ' || quotedText[i] >= 0xFF) 468if (quotedText[i] == '"' && (i == 0 || quotedText[i - 1] != '\\'))
System.Linq (21)
System\Linq\Aggregate.cs (1)
33result = func(result, span[i]);
System\Linq\Average.cs (1)
48sum += span[i];
System\Linq\Max.cs (6)
125for (i = 0; i < span.Length && T.IsNaN(span[i]); i++) ; 132for (value = span[i]; (uint)i < (uint)span.Length; i++) 134if (span[i] > value) 136value = span[i]; 247if (span[i] > value) 249value = span[i];
System\Linq\Min.cs (3)
109T current = span[i]; 227if (span[i] < value) 229value = span[i];
System\Linq\SegmentedArrayBuilder.cs (2)
78T[] currentSegment = segments[segmentsCount]; 87T[] segment = segments[i];
System\Linq\Select.SpeedOpt.cs (2)
168destination[i] = func(source[i]); 424destination[i] = func(source[i]);
System\Linq\Single.cs (2)
122TSource result = span[i]; 127if (predicate(span[i]))
System\Linq\Where.SpeedOpt.cs (4)
346if (predicate(source[i])) 349return source[i]; 494if (predicate(source[i])) 497return selector(source[i]);
System.Memory (16)
System\Buffers\SequenceReader.cs (3)
118value = CurrentSpan[CurrentSpanIndex]; 155value = CurrentSpan[CurrentSpanIndex + (int)offset]; 200value = CurrentSpan[CurrentSpanIndex];
System\Buffers\SequenceReader.Search.cs (13)
59if ((index > 0 && !remaining[index - 1].Equals(delimiterEscape)) || index == 0) 102else if (index > 0 && remaining[index - 1].Equals(delimiterEscape)) 111if (!remaining[i].Equals(delimiterEscape)) 151if (!remaining[i].Equals(delimiterEscape)) 259else if (index > 0 && remaining[index - 1].Equals(delimiterEscape)) 265for (int i = index; i > 0 && remaining[i - 1].Equals(delimiterEscape); i--, escapeCount++) 300for (int i = remaining.Length; i > 0 && remaining[i - 1].Equals(delimiterEscape); i--, escapeCount++) 581for (i = CurrentSpanIndex; i < CurrentSpan.Length && CurrentSpan[i].Equals(value); i++) 613for (i = CurrentSpanIndex; i < CurrentSpan.Length && values.Contains(CurrentSpan[i]); i++) 647T value = CurrentSpan[i]; 684T value = CurrentSpan[i]; 721T value = CurrentSpan[i]; 771if (CurrentSpan[CurrentSpanIndex].Equals(next))
System.Net.Http (47)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 648if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\Huffman.cs (5)
540return (EncodingTableCodes[data], EncodingTableBitLengths[data]); 584uint code = encodingTableCodes[octet]; 585int bitLength = encodingTableBitLengths[octet]; 696acc |= src[i++];
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (5)
344byte b = data[currentIndex++]; 430byte b = data[currentIndex++]; 536byte b = data[currentIndex++]; 565byte b = data[currentIndex++]; 697if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackEncoder.cs (2)
271value = values[i]; 286written = valueEncoding.GetBytes(values[i], buffer);
src\runtime\src\libraries\Common\src\System\Text\SimpleRegex.cs (6)
28if (patternPos < pattern.Length && pattern[patternPos] == '*') 36(pattern[patternPos] == input[inputPos] || 37char.ToUpperInvariant(pattern[patternPos]) == char.ToUpperInvariant(input[inputPos]))) 61while (patternPos < pattern.Length && pattern[patternPos] == '*')
System\Net\Http\Headers\AltSvcHeaderParser.cs (3)
262if ((value.Length - idx) < 3 || !TryReadAlpnHexDigit(value[idx + 1], out int hi) || !TryReadAlpnHexDigit(value[idx + 2], out int lo)) 371builder.Append(value[idx + 1]);
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
433value[value.Length - 1] == '"';
System\Net\Http\Headers\HeaderUtilities.cs (1)
340if (headers[i] is HttpHeaders hh)
System\Net\Http\HttpRuleParser.cs (1)
161if (slice[index] == '/')
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
431sb.Append(valueSpan.Slice(0, i)).Append('\\').Append(valueSpan[i]);
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
445byte c = lineAfterChunkSize[i];
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (1)
564int statusCode = HpackStaticStatusCodeTable[index - FirstHPackStatusPseudoHeaderId];
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (5)
1238if (name[spIdx] != ' ') 1264if ((uint)spIdx >= (uint)value.Length || !(value[spIdx] is (byte)' ' or (byte)'\t')) 1611int length = (uint)carriageReturnIndex < (uint)buffer.Length && buffer[carriageReturnIndex] == '\r' 1696Debug.Assert(searchOffset == readLength - 1 && _readBuffer.ActiveReadOnlySpan[searchOffset] == '\n'); 1734if (buffer[tabOrSpaceIndex] is not (byte)'\t' and not (byte)' ')
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (1)
209while (iter < proxyString.Length && ProxyDelimiters.Contains(proxyString[iter]))
System.Net.Http.WinHttpHandler (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
System.Net.HttpListener (8)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System.Net.Mail (60)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Net\Mail\MailBnfHelper.cs (2)
234if (i == 0 || !Ascii.IsValid(span[i])) 236throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, span[i]));
System\Net\Mail\SmtpReplyReaderFactory.cs (8)
100byte b = buffer[i++]; 117byte b = buffer[i++]; 134byte b = buffer[i++]; 151byte b = buffer[i++]; 172if (buffer[i++] == '\r') 184if (buffer[i++] != '\n') 202if (buffer[i++] == '\r') 214if (buffer[i++] != '\n')
System\Net\Mime\Base64Encoder.cs (4)
104_writeState.Append(Base64EncodeMap[_writeState.LastBits]); 110_writeState.Append(Base64EncodeMap[_writeState.LastBits]); 131_writeState.Append(Base64EncodeMap[_writeState.LastBits | ((b & 0xf0) >> 4)]); 136_writeState.Append(Base64EncodeMap[_writeState.LastBits | ((b & 0xc0) >> 6)]);
System\Net\Mime\ByteEncoder.cs (2)
27if (LineBreakNeeded(buffer[cur])) 40AppendEncodedByte(buffer[cur]);
System\Net\Mime\EightBitStream.cs (5)
103if ((buffer[i] == '\r') && ((i + 1) < buffer.Length) && (buffer[i + 1] == '\n')) 108else if ((WriteState.CurrentLineLength == 0) && (buffer[i] == '.')) 113WriteState.Append(buffer[i]); 118WriteState.Append(buffer[i]);
System\Net\Mime\QEncodedStream.cs (5)
93byte b1 = HexDecodeMap[source[0]]; 94byte b2 = HexDecodeMap[source[1]]; 110byte b1 = HexDecodeMap[ReadState.Byte]; 163byte b1 = HexDecodeMap[source[1]]; 164byte b2 = HexDecodeMap[source[2]];
System\Net\Mime\QuotedPrintableStream.cs (26)
122byte b1 = HexDecodeMap[source[0]]; 123byte b2 = HexDecodeMap[source[1]]; 139byte b1 = HexDecodeMap[ReadState.Byte]; 184byte b1 = HexDecodeMap[source[1]]; 185byte b2 = HexDecodeMap[source[2]]; 210if ((_lineLength != -1 && WriteState.CurrentLineLength + SizeOfEncodedChar + 2 >= _lineLength && (buffer[processed] == ' ' || 211buffer[processed] == '\t' || buffer[processed] == '\r' || buffer[processed] == '\n')) || 227if (buffer[processed] == '\r' && processed + 1 < buffer.Length && buffer[processed + 1] == '\n') 246else if ((buffer[processed] < 32 && buffer[processed] != '\t') || 247buffer[processed] == '=' || 248buffer[processed] > 126) 258WriteState.Append(HexEncodeMap[buffer[processed] >> 4]); 260WriteState.Append(HexEncodeMap[buffer[processed] & 0xF]); 270if ((buffer[processed] == (byte)'\t' || buffer[processed] == (byte)' ') && 281WriteState.Append(HexEncodeMap[buffer[processed] >> 4]); 283WriteState.Append(HexEncodeMap[buffer[processed] & 0xF]); 287WriteState.Append(buffer[processed]);
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
450hostSpan[hostSpan.Length - reservedName.Length - 1] == '.');
System.Net.NetworkInformation (13)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Net\NetworkInformation\LinuxIPv4InterfaceProperties.cs (1)
53return StringParsingHelpers.ParseRawIntFile(paths[i]) == 1;
System\Net\NetworkInformation\PhysicalAddress.cs (2)
160int character = address[i]; 210if (address[i] == delimiter)
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (2)
378addressBytes[targetIndex] = (byte)(HexToByte(hexAddress[srcIndex * 2]) * 16 379+ HexToByte(hexAddress[srcIndex * 2 + 1]));
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.RawSocket.cs (2)
489ushort element0 = (ushort)((buffer[i] << 8) & 0xFF00); 491? (ushort)(buffer[i + 1] & 0x00FF)
System.Net.Primitives (46)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (6)
46for (; (start < end) && (ch = ToUShort(str[start])) != '.' && ch != ':'; ++start) 140int ch = ToUShort(name[start]); 164(uint)(start + 1) < (uint)name.Length && char.IsAsciiDigit((char)ToUShort(name[start + 1]))) 223ch = ToUShort(name[current]); 237ch = ToUShort(name[current]); 256ch = ToUShort(name[current]);
src\runtime\src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (28)
23if (numbers[i] == 0) 119if (start < end && name[start] == TChar.CreateTruncating('[')) 131if (name[start] == TChar.CreateTruncating(':') && (start + 1 >= end || name[start + 1] != TChar.CreateTruncating(':'))) 139int currentCh = IPv4AddressHelper.ToUShort(name[i]); 168if (name[i] == TChar.CreateTruncating(']')) 172else if (name[i] == TChar.CreateTruncating('/')) 188if (i + 1 < end && name[i + 1] != TChar.CreateTruncating(':')) 195if (i + 3 < end && name[i + 2] == TChar.CreateTruncating('0') && name[i + 3] == TChar.CreateTruncating('x')) 200int ch = IPv4AddressHelper.ToUShort(name[i]); 213if (!char.IsAsciiDigit((char)IPv4AddressHelper.ToUShort(name[i]))) 223if ((i > 0) && (name[i - 1] == TChar.CreateTruncating(':'))) 327for (int i = (address[0] == TChar.CreateTruncating('[') ? 1 : 0); i < address.Length && address[i] != TChar.CreateTruncating(']');) 329currentCh = IPv4AddressHelper.ToUShort(address[i]); 343for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']') && address[i] != TChar.CreateTruncating('/'); ++i) 349for (; i < address.Length && address[i] != TChar.CreateTruncating(']'); ++i) 359if (address[i] == TChar.CreateTruncating(':')) 375(address[j] != TChar.CreateTruncating(']')) && 376(address[j] != TChar.CreateTruncating(':')) && 377(address[j] != TChar.CreateTruncating('%')) && 378(address[j] != TChar.CreateTruncating('/')) && 382if (address[j] == TChar.CreateTruncating('.')) 390while (j < address.Length && (address[j] != TChar.CreateTruncating(']')) && (address[j] != TChar.CreateTruncating('/')) && (address[j] != TChar.CreateTruncating('%'))) 416for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']'); i++)
System\Net\Cookie.cs (1)
347return host[idxOfSeparator] is '.' // The last character of 'host' that is not included in 'domain' is a "."
System\Net\IPAddressParser.cs (2)
242AppendHex(address[i], destination, ref offset); 259AppendHex(address[i], destination, ref offset);
System\Net\IPEndPoint.cs (1)
110if (s[lastColonPos - 1] == TChar.CreateTruncating(']'))
System.Net.Quic (44)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (6)
46for (; (start < end) && (ch = ToUShort(str[start])) != '.' && ch != ':'; ++start) 140int ch = ToUShort(name[start]); 164(uint)(start + 1) < (uint)name.Length && char.IsAsciiDigit((char)ToUShort(name[start + 1]))) 223ch = ToUShort(name[current]); 237ch = ToUShort(name[current]); 256ch = ToUShort(name[current]);
src\runtime\src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (28)
23if (numbers[i] == 0) 119if (start < end && name[start] == TChar.CreateTruncating('[')) 131if (name[start] == TChar.CreateTruncating(':') && (start + 1 >= end || name[start + 1] != TChar.CreateTruncating(':'))) 139int currentCh = IPv4AddressHelper.ToUShort(name[i]); 168if (name[i] == TChar.CreateTruncating(']')) 172else if (name[i] == TChar.CreateTruncating('/')) 188if (i + 1 < end && name[i + 1] != TChar.CreateTruncating(':')) 195if (i + 3 < end && name[i + 2] == TChar.CreateTruncating('0') && name[i + 3] == TChar.CreateTruncating('x')) 200int ch = IPv4AddressHelper.ToUShort(name[i]); 213if (!char.IsAsciiDigit((char)IPv4AddressHelper.ToUShort(name[i]))) 223if ((i > 0) && (name[i - 1] == TChar.CreateTruncating(':'))) 327for (int i = (address[0] == TChar.CreateTruncating('[') ? 1 : 0); i < address.Length && address[i] != TChar.CreateTruncating(']');) 329currentCh = IPv4AddressHelper.ToUShort(address[i]); 343for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']') && address[i] != TChar.CreateTruncating('/'); ++i) 349for (; i < address.Length && address[i] != TChar.CreateTruncating(']'); ++i) 359if (address[i] == TChar.CreateTruncating(':')) 375(address[j] != TChar.CreateTruncating(']')) && 376(address[j] != TChar.CreateTruncating(':')) && 377(address[j] != TChar.CreateTruncating('%')) && 378(address[j] != TChar.CreateTruncating('/')) && 382if (address[j] == TChar.CreateTruncating('.')) 390while (j < address.Length && (address[j] != TChar.CreateTruncating(']')) && (address[j] != TChar.CreateTruncating('/')) && (address[j] != TChar.CreateTruncating('%'))) 416for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']'); i++)
src\runtime\src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (1)
126HexConverter.ToBytesBuffer(source[i], destination.Slice(i * 2));
System\Net\Quic\Internal\ReceiveBuffers.cs (1)
55Span<byte> quicBuffer = quicBuffers[i].Span;
System.Net.Security (61)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (6)
46for (; (start < end) && (ch = ToUShort(str[start])) != '.' && ch != ':'; ++start) 140int ch = ToUShort(name[start]); 164(uint)(start + 1) < (uint)name.Length && char.IsAsciiDigit((char)ToUShort(name[start + 1]))) 223ch = ToUShort(name[current]); 237ch = ToUShort(name[current]); 256ch = ToUShort(name[current]);
src\runtime\src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (28)
23if (numbers[i] == 0) 119if (start < end && name[start] == TChar.CreateTruncating('[')) 131if (name[start] == TChar.CreateTruncating(':') && (start + 1 >= end || name[start + 1] != TChar.CreateTruncating(':'))) 139int currentCh = IPv4AddressHelper.ToUShort(name[i]); 168if (name[i] == TChar.CreateTruncating(']')) 172else if (name[i] == TChar.CreateTruncating('/')) 188if (i + 1 < end && name[i + 1] != TChar.CreateTruncating(':')) 195if (i + 3 < end && name[i + 2] == TChar.CreateTruncating('0') && name[i + 3] == TChar.CreateTruncating('x')) 200int ch = IPv4AddressHelper.ToUShort(name[i]); 213if (!char.IsAsciiDigit((char)IPv4AddressHelper.ToUShort(name[i]))) 223if ((i > 0) && (name[i - 1] == TChar.CreateTruncating(':'))) 327for (int i = (address[0] == TChar.CreateTruncating('[') ? 1 : 0); i < address.Length && address[i] != TChar.CreateTruncating(']');) 329currentCh = IPv4AddressHelper.ToUShort(address[i]); 343for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']') && address[i] != TChar.CreateTruncating('/'); ++i) 349for (; i < address.Length && address[i] != TChar.CreateTruncating(']'); ++i) 359if (address[i] == TChar.CreateTruncating(':')) 375(address[j] != TChar.CreateTruncating(']')) && 376(address[j] != TChar.CreateTruncating(':')) && 377(address[j] != TChar.CreateTruncating('%')) && 378(address[j] != TChar.CreateTruncating('/')) && 382if (address[j] == TChar.CreateTruncating('.')) 390while (j < address.Length && (address[j] != TChar.CreateTruncating(']')) && (address[j] != TChar.CreateTruncating('/')) && (address[j] != TChar.CreateTruncating('%'))) 416for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']'); i++)
src\runtime\src\libraries\Common\src\System\Net\Security\MD4.cs (1)
177BinaryPrimitives.WriteUInt32LittleEndian(output.Slice(j), input[i]);
src\runtime\src\libraries\Common\src\System\Net\Security\RC4.cs (2)
58index2 = (byte)(key[index1] + state[counter] + index2); 87output[counter] = (byte)(input[counter] ^ state[xorIndex]);
src\runtime\src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (1)
126HexConverter.ToBytesBuffer(source[i], destination.Slice(i * 2));
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
529if (length > 0 && tokenBytes[length - 1] == '\0')
System\Net\Security\SslConnectionInfo.Unix.cs (2)
40DataHashAlg = dataHashAlgs[data & 0xF]; 41DataHashKeySize = dataHashKeySizes[data & 0xF];
System\Net\Security\SslStream.IO.cs (2)
446if (!_isRenego && _buffer.EncryptedReadOnlySpan[_lastFrame.Header.Version == SslProtocols.Ssl2 ? HandshakeTypeOffsetSsl2 : HandshakeTypeOffsetTls] == (byte)TlsHandshakeType.ClientHello && 517_buffer.EncryptedReadOnlySpan[_lastFrame.Header.Version == SslProtocols.Ssl2 ? HandshakeTypeOffsetSsl2 : HandshakeTypeOffsetTls] == (byte)TlsHandshakeType.ClientHello;
System\Net\Security\TlsFrameHelper.cs (10)
258info.HandshakeType = (TlsHandshakeType)frame[HandshakeTypeOffset]; 382((TlsHandshakeType)sslHandshake[HandshakeTypeOffset] != TlsHandshakeType.ClientHello && 383(TlsHandshakeType)sslHandshake[HandshakeTypeOffset] != TlsHandshakeType.ServerHello)) 397if (helloData[ProtocolVersionMajorOffset] == ProtocolVersionTlsMajorValue) 399info.SupportedVersions |= TlsMinorVersionToProtocol(helloData[ProtocolVersionMinorOffset]); 402return (TlsHandshakeType)sslHandshake[HandshakeTypeOffset] == TlsHandshakeType.ClientHello ? 608NameType nameType = (NameType)serverName[NameTypeOffset]; 666byte supportedVersionLength = extensionData[VersionListLengthOffset]; 677if (extensionData[ProtocolVersionMajorOffset] == ProtocolVersionTlsMajorValue) 679protocols |= TlsMinorVersionToProtocol(extensionData[ProtocolVersionMinorOffset]);
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\SseFormatter.cs (2)
153if (data[i++] == '\r' && i < data.Length && data[i] == '\n')
System.Net.Sockets (2)
System\Net\Sockets\SafeSocketHandle.Unix.OptionTracking.cs (1)
103SocketError errorCode = SocketPal.SetSockOpt(this, level, name, values[i]);
System\Net\Sockets\UnixDomainSocketEndPoint.cs (1)
76_encodedPath[i] = socketAddress[s_nativePathOffset + i];
System.Net.WebClient (8)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System.Net.WebSockets (2)
System\Net\WebSockets\ManagedWebSocket.cs (2)
1800byte b = span[i]; 1834byte b = span[i];
System.Numerics.Tensors (162)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfMinMaxOperator.cs (1)
70T current = x[i];
System\Numerics\Tensors\netcore\Tensor.cs (66)
139nint sumOfAxis = tensors[0].Lengths[dimension]; 142if (tensors[0].Rank != tensors[i].Rank) 148if (tensors[0].Lengths[j] != tensors[i].Lengths[j]) 154sumOfAxis += tensors[i].Lengths[dimension]; 171totalLength += tensors[i].FlattenedLength; 215totalLength += tensors[i].FlattenedLength; 221nint sumOfAxis = tensors[0].Lengths[dimension]; 225if (rank != tensors[i].Rank) 233if (tensors[0].Lengths[j] != tensors[i].Lengths[j]) 239sumOfAxis += tensors[i].Lengths[dimension]; 285TensorOperation.Invoke<TensorOperation.CopyTo<T>, T, T>(tensors[i], dstSpan); 286dstSpan = dstSpan.Slice((int)tensors[i].FlattenedLength); 306Tensor<T> slice = tensors[i].Slice(ranges); 1343newLengths[i] = tensor.Lengths[tensor.Rank - 1 - i]; 1344newStrides[i] = tensor.Strides[tensor.Rank - 1 - i]; 1351if (dimensions[i] >= tensor.Lengths.Length || dimensions[i] < 0) 1355newLengths[i] = tensor.Lengths[dimensions[i]]; 1356newStrides[i] = tensor.Strides[dimensions[i]]; 1397if (lengths[i] != -1) 1399tempTotal /= lengths[i]; 1423if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1428origStrides.Add(tensor.Strides[lengthOffset - 1]); 1430origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 1469if (lengths[i] != -1) 1471tempTotal /= lengths[i]; 1496if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1503origStrides.Add(tensor.Strides[lengthOffset - 1]); 1505origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 1546if (lengths[i] != -1) 1548tempTotal /= lengths[i]; 1573if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1578origStrides.Add(tensor.Strides[lengthOffset - 1]); 1580origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 1763for (int i = (int)tensor.Lengths[dimension]; i > 0; i--) 1766dstIndexes[dimension] = new NRange(tensor.Lengths[dimension] - i, tensor.Lengths[dimension] - i + 1); 1931if (tensor.Lengths[i] != 1) 1933lengths[index] = tensor.Lengths[i]; 1934strides[index] = tensor.Strides[i]; 1945if (tensor.Lengths[dimension] != 1) 1998if (tensor.Lengths[i] != 1) 2000lengths[index] = tensor.Lengths[i]; 2001strides[index] = tensor.Strides[i]; 2012if (tensor.Lengths[dimension] != 1) 2065if (tensor.Lengths[i] != 1) 2067lengths[index] = tensor.Lengths[i]; 2068strides[index] = tensor.Strides[i]; 2079if (tensor.Lengths[dimension] != 1) 2124if (!tensors[0].Lengths.SequenceEqual(tensors[i].Lengths)) 2136outputs[i] = Unsqueeze(tensors[i], dimension); 2164if (!tensors[0].Lengths.SequenceEqual(tensors[i].Lengths)) 2176outputs[i] = Unsqueeze(tensors[i], dimension); 2317if (values[i] is not null) 2319sb.Append(values[i]);
System\Numerics\Tensors\netcore\TensorOperation.cs (47)
135destinationIndexes[i] = destination.Lengths[i] - 1; 380nint xLen = (i >= xOffset) ? xLengths[i - xOffset] : 1; 381nint yLen = (i >= yOffset) ? yLengths[i - yOffset] : 1; 445destination[i] = (left[i] == right); 453destination[i] = (left[i] == right[i]); 485result = (left[i] != right); 503result = (left[i] != right[i]); 676destination[i] = T.Atan2(x[i], y); 705destination[i] = T.Atan2Pi(x[i], y); 2005destination += T.Exp(x[i]); 2023destination[i] = T.Exp(x[i]) / y; 2108destination[i] = (x[i] - y) * (x[i] - y); 2121destination[i] = (x[i] - y[i]) * (x[i] - y[i]); 2141T diff = T.Abs(x[i] - y); 2293if (x[i]) 2295destination[i] = y[i]; 2312if (x[i]) 2339destination[i] = (left[i] > right); 2347destination[i] = (left[i] > right[i]); 2379result = !(left[i] > right); 2397result = !(left[i] > right[i]); 2428destination[i] = (left[i] >= right); 2436destination[i] = (left[i] >= right[i]); 2468result = !(left[i] >= right); 2486result = !(left[i] >= right[i]); 2517destination[i] = (left[i] < right); 2525destination[i] = (left[i] < right[i]); 2557result = !(left[i] < right); 2575result = !(left[i] < right[i]); 2606destination[i] = (left[i] <= right); 2614destination[i] = (left[i] <= right[i]); 2646result = !(left[i] <= right); 2664result = !(left[i] <= right[i]);
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (4)
177Update(x[i], y[i], ref dotProduct, ref xSumOfSquares, ref ySumOfSquares); 332Update((float)x[i], (float)y[i], ref dotProduct, ref xSumOfSquares, ref ySumOfSquares);
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (6)
30count += long.CreateTruncating(T.PopCount(x[i] ^ y[i])); 180if (!EqualityComparer<T>.Default.Equals(x[i], y[i])) 191if (!comparer.Equals(x[i], y[i]))
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (1)
345T current = x[i];
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (1)
22count += long.CreateTruncating(T.PopCount(x[i]));
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (1)
144T power10 = roundPower10[digits];
System\Numerics\Tensors\netcore\TensorShape.cs (35)
111nint length = lengths[i]; 187nint length = lengths[strideIndex]; 391if (leftLengths[i] != rightLengths[i]) 396if (leftStrides[i] != rightStrides[i]) 422nint length = lengths[rankIndex]; 423nint stride = strides[rankIndex]; 432if (index < destinationLengths[destinationRankIndex]) 452nint length = destinationLengths[rankIndex]; 487nint length = lengths[rankIndex]; 488nint stride = strides[rankIndex]; 507indexes[destinationRankIndex] = destinationLengths[destinationRankIndex] - 1; 517nint length = destinationLengths[rankIndex]; 544if (ranges[i].Start.Value >= lengths[i]) 598nint length1 = lengths1[i]; 599nint length2 = lengths2[i]; 628nint stride1 = strides1[i]; 629nint stride2 = strides2[i]; 669nint length1 = lengths1[i]; 670nint length2 = lengths2[i]; 800int offset = start[index]; 1015nint offset = TGetOffsetAndLength.GetOffset(state[i], lengths[i]); 1016linearOffset += (offset * strides[i]); 1038nint length = lengths[rankIndex]; 1041linearOffset += (remainder * strides[rankIndex]); 1075(nint offset, nint length) = TGetOffsetAndLength.GetOffsetAndLength(state[i], lengths[i]); 1077nint stride = strides[i]; 1166nint previousLength = previousLengths[i]; 1167nint previousStride = previousStrides[i]; 1169(nint offset, nint length) = TGetOffsetAndLength.GetOffsetAndLength(state[i], previousLength); 1253nint stride = strides[index]; 1266nint length = lengths[index];
System.Private.CoreLib (881)
Internal\Reflection\Augments\ReflectionAugments.cs (1)
369parameterTypes[i] = parameters[i].ParameterType;
Internal\Reflection\Extensions\NonPortable\CustomAttributeInstantiator.cs (1)
53Type parameterType = parameters[i].ParameterType;
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\IO\PathInternal.cs (9)
127if (IsDirectorySeparator(path[skip - 1])) 140char c = path[i]; 146if (IsDirectorySeparator(path[i + 1])) 153if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 154path[i + 1] == '.') 163(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 164path[i + 1] == '.' && path[i + 2] == '.') 205sb.Append(path[rootLength - 1]);
src\runtime\src\libraries\Common\src\System\Number.Formatting.Common.cs (4)
98while ((uint)i < (uint)format.Length && char.IsAsciiDigit(format[i])) 105n = (n * 10) + format[i++] - '0'; 110if ((uint)i >= (uint)format.Length || format[i] == '\0') 807*(p--) = sGroup[j];
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
349ch = _input[_index++];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (1)
750int index = indices[i] - Unsafe.Add(ref bounds, indices.Length + i);
src\runtime\src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (2)
874byte b = src[i++]; 879b = src[i++];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Boolean.cs (4)
297if (!char.IsWhiteSpace(value[start]) && value[start] != '\0') 307if (!char.IsWhiteSpace(value[end]) && value[end] != '\0')
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (2)
393destination[i] = ReverseEndianness(source[i]); 401destination[i] = ReverseEndianness(source[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (1)
113uint digit = format[srcIndex] - 48u; // '0'
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (8)
491if (IsWhiteSpace(source[encodedIdx])) 497buffer[bufferIdx] = source[encodedIdx]; 551if (!IsWhiteSpace(source[i])) 596if (IsWhiteSpace(source[encodedIdx])) 602buffer[bufferIdx] = source[encodedIdx]; 656if (!IsWhiteSpace(source[i])) 1586if (!IsWhiteSpace(span[i])) 1802if (!IsWhiteSpace(span[i]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64ValidatorHelper.cs (4)
26lastChar = base64Text[base64Text.Length - 1]; 33lastChar = base64Text[index - 1]; 36T charToValidate = base64Text[index]; 184int decoded = default(Base64DecoderByte).DecodingMap[lastChar];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlValidator.cs (1)
117int decoded = default(Base64UrlDecoderByte).DecodingMap[lastChar];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.Helpers.cs (1)
166int totalDays = (yearMinusOne * 365) + (yearMinusOne / 4) - (yearMinusOne / 100) + (yearMinusOne / 400) + days[month - 1] + day - 1;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Float.cs (4)
122byte c = source[srcIndex]; 147if ((((source[srcIndex] ^ (byte)('n')) & ~0x20) == 0) && 148(((source[srcIndex + 1] ^ (byte)('a')) & ~0x20) == 0) && 149(((source[srcIndex + 2] ^ (byte)('n')) & ~0x20) == 0))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Guid.cs (5)
150if (source[justConsumed] != '-') 173if (source[justConsumed] != '-') 196if (source[justConsumed] != '-') 219if (source[justConsumed] != '-') 242if (ends != 0 && source[justConsumed] != (byte)ends)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.D.cs (33)
15int num = source[index]; 22num = source[index]; 29num = source[index]; 43num = source[index]; 54num = source[index]; 63num = source[index]; 75if (!ParserHelpers.IsDigit(source[index])) 100int num = source[index]; 107num = source[index]; 114num = source[index]; 128num = source[index]; 139num = source[index]; 147num = source[index]; 155num = source[index]; 164num = source[index]; 176if (!ParserHelpers.IsDigit(source[index])) 201int num = source[index]; 208num = source[index]; 215num = source[index]; 229num = source[index]; 240num = source[index]; 248num = source[index]; 256num = source[index]; 264num = source[index]; 272num = source[index]; 280num = source[index]; 288num = source[index]; 296num = source[index]; 305num = source[index]; 319if (!ParserHelpers.IsDigit(source[index])) 349firstChar = (uint)source[idx] - '0'; 391nuint nextChar = (uint)source[idx] - '0'; 402nuint nextChar = (uint)source[idx] - '0';
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.N.cs (24)
15int c = source[index]; 22c = source[index]; 29c = source[index]; 49c = source[index]; 72if (source[index] != '0') 81c = source[index]; 107int c = source[index]; 114c = source[index]; 121c = source[index]; 141c = source[index]; 164if (source[index] != '0') 173c = source[index]; 199int c = source[index]; 206c = source[index]; 213c = source[index]; 233c = source[index]; 259if (source[index] != '0') 268c = source[index]; 294int c = source[index]; 301c = source[index]; 308c = source[index]; 328c = source[index]; 354if (source[index] != '0') 363c = source[index];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.D.cs (26)
14int num = source[index]; 26num = source[index]; 37num = source[index]; 46num = source[index]; 56if (!ParserHelpers.IsDigit(source[index])) 80int num = source[index]; 92num = source[index]; 103num = source[index]; 111num = source[index]; 119num = source[index]; 128num = source[index]; 138if (!ParserHelpers.IsDigit(source[index])) 162int num = source[index]; 174num = source[index]; 185num = source[index]; 193num = source[index]; 201num = source[index]; 209num = source[index]; 217num = source[index]; 225num = source[index]; 233num = source[index]; 241num = source[index]; 250num = source[index]; 260if (!ParserHelpers.IsDigit(source[index])) 307nuint nextChar = (uint)source[idx] - '0'; 318nuint nextChar = (uint)source[idx] - '0';
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.N.cs (20)
17int c = source[index]; 23c = source[index]; 43c = source[index]; 64if (source[index] != '0') 73c = source[index]; 98int c = source[index]; 104c = source[index]; 124c = source[index]; 145if (source[index] != '0') 154c = source[index]; 179int c = source[index]; 185c = source[index]; 205c = source[index]; 226if (source[index] != '0') 235c = source[index]; 260int c = source[index]; 266c = source[index]; 286c = source[index]; 307if (source[index] != '0') 316c = source[index];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.X.cs (28)
23nextDigit = hexLookup[nextCharacter]; 37nextCharacter = source[index]; 38nextDigit = hexLookup[nextCharacter]; 54nextCharacter = source[index]; 55nextDigit = hexLookup[nextCharacter]; 66nextCharacter = source[index]; 67nextDigit = hexLookup[nextCharacter]; 105nextDigit = hexLookup[nextCharacter]; 119nextCharacter = source[index]; 120nextDigit = hexLookup[nextCharacter]; 136nextCharacter = source[index]; 137nextDigit = hexLookup[nextCharacter]; 148nextCharacter = source[index]; 149nextDigit = hexLookup[nextCharacter]; 187nextDigit = hexLookup[nextCharacter]; 201nextCharacter = source[index]; 202nextDigit = hexLookup[nextCharacter]; 218nextCharacter = source[index]; 219nextDigit = hexLookup[nextCharacter]; 230nextCharacter = source[index]; 231nextDigit = hexLookup[nextCharacter]; 269nextDigit = hexLookup[nextCharacter]; 283nextCharacter = source[index]; 284nextDigit = hexLookup[nextCharacter]; 300nextCharacter = source[index]; 301nextDigit = hexLookup[nextCharacter]; 312nextCharacter = source[index]; 313nextDigit = hexLookup[nextCharacter];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Number.cs (9)
38byte c = source[srcIndex]; 52c = source[srcIndex]; 66c = source[srcIndex]; 84c = source[srcIndex]; 139c = source[srcIndex]; 170while (startIndexOfDigitsAfterDecimalToCopy < srcIndex && source[startIndexOfDigitsAfterDecimalToCopy] == '0') 233c = source[srcIndex]; 247c = source[srcIndex]; 273c = source[srcIndex];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpan.BigG.cs (7)
14c = source[srcIndex]; 48if (srcIndex == source.Length || source[srcIndex++] != Utf8Constants.Colon) 63if (srcIndex == source.Length || source[srcIndex++] != Utf8Constants.Colon) 78if (srcIndex == source.Length || source[srcIndex++] != Utf8Constants.Colon) 93if (srcIndex == source.Length || source[srcIndex++] != Utf8Constants.Period) 120if (srcIndex != source.Length && (source[srcIndex] == Utf8Constants.Period || source[srcIndex] == Utf8Constants.Colon))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpan.cs (2)
54uint digit = source[srcIndex] - 48u; // '0' 68digit = source[srcIndex] - 48u; // '0'
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpanSplitter.cs (4)
43c = source[srcIndex]; 166if (srcIndex != source.Length && (source[srcIndex] == Utf8Constants.Period || source[srcIndex] == Utf8Constants.Colon)) 187byte c = source[srcIndex];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
319result = source[source.Length - sizeof(byte)];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (8)
98return (UnicodeCategory)(Latin1CharInfo[c] & UnicodeCategoryMask); 407return (Latin1CharInfo[c] & (IsUpperCaseLetterFlag | IsLowerCaseLetterFlag)) != 0; 415return (Latin1CharInfo[c] & IsWhiteSpaceFlag) != 0; 442return (Latin1CharInfo[c] & IsUpperCaseLetterFlag) != 0; 456return (Latin1CharInfo[c] & IsLowerCaseLetterFlag) != 0; 717return (Latin1CharInfo[c] & (IsUpperCaseLetterFlag | IsLowerCaseLetterFlag)) != 0; 754return (Latin1CharInfo[c] & IsLowerCaseLetterFlag) != 0; 943return (Latin1CharInfo[c] & IsUpperCaseLetterFlag) != 0;
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTime.cs (10)
972uint daysToMonth = daysTo[m - 1]; 973int days = (int)(daysTo[m] - daysToMonth); 1035n += DaysToMonth366[m]; 1040n += DaysToMonth365[m]; 1091if ((uint)day > days[month] - days[month - 1]) 1096uint n = DaysToYear((uint)year) + days[month - 1] + (uint)day - 1; 2002if ((uint)day > days[month] - days[month - 1]) 2006ulong ticks = (DaysToYear((uint)year) + days[month - 1] + (uint)day - 1) * (ulong)TimeSpan.TicksPerDay;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (19)
1027low64 = Math.BigMul((uint)low64, UInt32Powers10[scale]); 1039power = UInt32Powers10[scale]; 1052power = UInt32Powers10[scale]; 1080power = UInt32Powers10[scale]; 1372uint power = scale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[scale]; 1428ulong power = UInt64Powers10[scale]; 1604dbl *= DoublePowers10[power]; 1646result.Low64 = Math.BigMul(mant, UInt32Powers10[power]); 1654ulong low64 = Math.BigMul(mant, UInt32Powers10[power - 18]); 1659ulong low64 = Math.BigMul(mant, UInt32Powers10[power - 9]); 1764dbl *= DoublePowers10[power]; 1806uint pow10 = UInt32Powers10[power]; 1820UInt64x64To128(mant, UInt64Powers10[power - 1], ref result); 1908(double)value.High * ds2to64) / DoublePowers10[value.Scale]; 2006power = UInt32Powers10[curScale]; 2084power = UInt32Powers10[curScale]; 2155power = UInt32Powers10[curScale]; 2240uint power = scale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[scale]; 2263uint power = iCurScale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[iCurScale];
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (25)
135if (par[j].DefaultValue == DBNull.Value) 142if (par[j].DefaultValue == DBNull.Value) 144if (!par[j].ParameterType.IsArray) 147if (!par[j].IsDefined(typeof(ParamArrayAttribute), true)) 150paramArrayType = par[j].ParameterType.GetElementType(); 160if (!par[lastArgPos].ParameterType.IsArray) 163if (!par[lastArgPos].IsDefined(typeof(ParamArrayAttribute), true)) 169paramArrayType = par[lastArgPos].ParameterType.GetElementType(); 177if (par[lastArgPos].ParameterType.IsArray 178&& par[lastArgPos].IsDefined(typeof(ParamArrayAttribute), true) 181if (!par[lastArgPos].ParameterType.IsAssignableFrom(argTypes[lastArgPos])) 182paramArrayType = par[lastArgPos].ParameterType.GetElementType(); 196pCls = par[j].ParameterType; 246if (defaultValueBinding && par[j].HasDefaultValue) 344objs[i] = parms[i].DefaultValue; 423objs[i] = parameters[i].DefaultValue; 431objs[i] = parameters[i].DefaultValue; 572Type pCls = par[j].ParameterType; 573if (types[j].MatchesParameterTypeExactly(par[j])) 810Type pCls = par[j].ParameterType; 899c1 = p1[paramOrder1[i]].ParameterType; 904c2 = p2[paramOrder2[i]].ParameterType; 1110if (params1[i].ParameterType != params2[i].ParameterType) 1199if (names[i].Equals(pars[j].Name))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Delegate.cs (1)
48d = Combine(d, delegates[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (2)
111if (payload[j - 1] == (byte)(0) && payload[j] == (byte)(0))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2114string name = names[foundItems[i]];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (1)
131sum += (coefficients[i] * indeterminateRaised);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CharUnicodeInfo.cs (4)
102int c = (int)s[index]; 108int temp2 = (int)s[index + 1] - LOW_SURROGATE_START; // temp2 = 000000xxxxxxxxxx 447codePoint = s[index]; 454int temp2 = s[index] - LOW_SURROGATE_START;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (18)
160if (valueChar >= 0x80 || HighCharTable[valueChar]) 275if (valueChar >= 0x80 || HighCharTable[valueChar]) 363if (charA >= 0x80 || charB >= 0x80 || HighCharTable[charA] || HighCharTable[charB]) 398if (charB >= 0x80 || HighCharTable[charB]) 406if (charA >= 0x80 || HighCharTable[charA]) 445if (charA >= 0x80 || charB >= 0x80 || HighCharTable[charA] || HighCharTable[charB]) 469if (charB >= 0x80 || HighCharTable[charB]) 478if (charA >= 0x80 || HighCharTable[charA]) 547if (charA >= 0x80 || charB >= 0x80 || HighCharTable[charA] || HighCharTable[charB]) 582if (charB >= 0x80 || HighCharTable[charB]) 591if (charA >= 0x80 || HighCharTable[charA]) 630if (charA >= 0x80 || charB >= 0x80 || HighCharTable[charA] || HighCharTable[charB]) 654if (charB >= 0x80 || HighCharTable[charB]) 663if (charA >= 0x80 || HighCharTable[charA])
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (3)
51BinaryPrimitives.WriteUInt16BigEndian(sortKey, (ushort)source[i]); 62char c = source[i]; 65char cl = source[i + 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (3)
375char current = icuFormatString[i]; 386if (i + 1 < icuFormatString.Length && icuFormatString[i + 1] == '\'') 404current = icuFormatString[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (19)
200while ((uint)index < (uint)format.Length && format[index] == patternChar) 291char quoteChar = format[pos++]; // Get the character used to quote the following string. 296char ch = format[pos++]; 311result.Append(TChar.CastFrom(format[pos++])); 350return format[pos + 1]; 375for (i = index - 1; i >= 0 && format[i] != patternToMatch; i--) { /*Do nothing here */ } 380while (--i >= 0 && format[i] == patternToMatch) 401for (i = index + tokenLen; i < format.Length && format[i] != patternToMatch; i++) { /* Do nothing here */ } 407while (++i < format.Length && format[i] == patternToMatch) 444char ch = format[i]; 628((i + tokenLen < format.Length && format[i + tokenLen] == DateTimeFormatInfoScanner.CJKYearSuff) || 629(i + tokenLen < format.Length - 1 && format[i + tokenLen] == '\'' && format[i + tokenLen + 1] == DateTimeFormatInfoScanner.CJKYearSuff))) 1211switch (format[i]) 1229char quoteChar = format[i++]; 1230while (i < format.Length && format[i] != quoteChar) 1283switch (format[i]) 1301char quoteChar = format[i++]; 1302while (i < length && format[i] != quoteChar)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (4)
2228if (!HebrewNumber.IsDigit(str.Value[i])) 2240state = HebrewNumber.ParseByChar(str.Value[i++], ref context); 2354char nextCh = str.Value[nextCharIndex]; 2360((value.tokenString.Length == 1 && str.Value[str.Index] == value.tokenString[0]) ||
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (45)
435char nextCh = str.Value[nextCharIndex]; 444str.m_current = str.Value[str.Index]; 583char nextCh = str.Value[str.Index]; 589nextCh = str.Value[str.Index + whitespaceCount]; 658char nextCh = str.Value[str.Index]; 1183char ch = str.Value[str.Index]; 1190ch = str.Value[i]; 3359char ch = format[i]; 3378while (i + 1 < format.Length && format[i + 1] == 'd') 4467if (parseInfo.fAllowInnerWhite && char.IsWhiteSpace(quotedSpan[i])) 4471else if (!str.Match(quotedSpan[i])) 4500if (format.Index >= format.Value.Length - 1 || format.Value[format.Index + 1] == '%') 4589char quoteChar = format[pos++]; // Get the character used to quote the following string. 4594char ch = format[pos++]; 4609result.Append(format[pos++]); 5266if (source[colonIndex] != ':') 5274uint om1 = (uint)(source[colonIndex + 1] - '0'), om2 = (uint)(source[colonIndex + 2] - '0'); 5540m_current = Value[Index]; 5557m_current = Value[Index]; 5586m_current = Value[Index]; 5617m_current = Value[Index]; 5640m_current = Value[Index]; 5721if (!char.IsWhiteSpace(Value[thisPosition + segmentLength])) 5736while (thisPosition < Value.Length && char.IsWhiteSpace(Value[thisPosition])) 5770if (char.IsLetter(Value[nextCharIndex])) 5805if ((Value[Index] == ch) || 5806(ch == ' ' && IsSpaceReplacingChar(Value[Index]))) 5855char repeatChar = Value[Index]; 5857while ((pos < Length) && (Value[pos] == repeatChar)) 5873char.IsAsciiDigit(Value[Index]); 5881return Value[Index]; 5890Debug.Assert(char.IsAsciiDigit(Value[Index]), "IsDigit(Value[Index])"); 5891return Value[Index] - '0'; 5905char ch = Value[Index + 1]; 5936m_current = Value[Index]; 5949while (i >= 0 && char.IsWhiteSpace(Value[i])) 5965char ch = Value[i]; 5969if (char.IsWhiteSpace(Value[i - 1])) 5972while (i >= 1 && char.IsWhiteSpace(Value[i - 1])) 5993char ch = Value[i]; 5997while ((i + 1) < Length && char.IsWhiteSpace(Value[i + 1])) 6019char ch = Value[Index + sub.length]; 6069m_current = Value[Index]; 6091internal char this[int relativeIndex] => s[index + relativeIndex];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\EastAsianLunisolarCalendar.cs (6)
275int solarDay = isLeapYear ? DaysToMonth366[solarMonth - 1] : DaysToMonth365[solarMonth - 1]; 316lunarDay -= DaysToMonth365[jan1Month - 1]; 370solarDay += days[jan1Month - 1]; 388if (days[solarMonth] >= solarDay) 394solarDay -= days[solarMonth - 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendar.cs (7)
100if (day >= 1 && (day <= days[month] - days[month - 1])) 103return y * 365 + y / 4 - y / 100 + y / 400 + days[month - 1] + day - 1; 161int days = (daysArray[m] - daysArray[m - 1]); 282return day <= (days[month] - days[month - 1]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (4)
232int days = (daysArray[m] - daysArray[m - 1]); 299return days[month] - days[month - 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (10)
396lunarDate.day = HebrewTable[index]; 399int lunarYearType = HebrewTable[index + 1]; 479if ((numDays + (long)lunarDate.day) <= (long)(LunarMonthLen[hebrewYearType * MaxMonthPlusOne + lunarDate.month])) 493numDays -= (long)(LunarMonthLen[hebrewYearType * MaxMonthPlusOne + lunarDate.month] - lunarDate.day); 501while (numDays > (long)(LunarMonthLen[hebrewYearType * MaxMonthPlusOne + result.month])) 504numDays -= (long)(LunarMonthLen[hebrewYearType * MaxMonthPlusOne + result.month++]); 508if ((result.month > 13) || (LunarMonthLen[hebrewYearType * MaxMonthPlusOne + result.month] == 0)) 661int monthDays = LunarMonthLen[hebrewYearType * MaxMonthPlusOne + month]; 778int days = LunarMonthLen[lunarYearType * MaxMonthPlusOne + month1] - day1; 786days += LunarMonthLen[lunarYearType * MaxMonthPlusOne + month1++];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (3)
83return (long)(DaysUpToHijriYear(y) + HijriMonthDays[m - 1] + d - 1 - HijriAdjustment); 244while ((hijriMonth <= 12) && (numDays > HijriMonthDays[hijriMonth - 1])) 256int hijriDay = (int)(numDays - HijriMonthDays[hijriMonth - 1]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IcuLocaleData.cs (8)
3719int array_value = indices[index] << 8 | indices[index + 1]; 3725start = (indices[index + 2] << 4) | indices[index + 3] >> 4; 3726int length = indices[index + 3] & 0xF; 3852int high = localesNamesIndexes[index]; 3853int low = localesNamesIndexes[index + 1]; 3867s[i] = (char)buffer[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (16)
334if (unicode[i] <= 0x1f) 340if (bCheckAscii && unicode[i] >= 0x7f) 344if (IsDot(unicode[i])) 356ValidateStd3(unicode[i - 1], true); 366ValidateStd3(unicode[i], i == iLastDot + 1); 457if (char.IsLowSurrogate(unicode[iTest])) 476Debug.Assert(!char.IsLowSurrogate(unicode[basicCount]), "[IdnMapping.punycode_encode]Unexpected low surrogate"); 496if (Basic(unicode[basicCount])) 498output.Append(EncodeBasic(unicode[basicCount])); 502else if (basicCount + 1 < iNextDot && char.IsSurrogatePair(unicode[basicCount], unicode[basicCount + 1])) 638if (char.IsHighSurrogate(s[index]) && index + 1 < s.Length && char.IsLowSurrogate(s[index + 1])) 640return char.ConvertToUtf32(s[index], s[index + 1]); 643return s[index];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (1)
172char c = s[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\InvariantModeCasing.cs (20)
31if (char.IsHighSurrogate(source[i]) && i < s.Length - 1 && char.IsLowSurrogate(source[i + 1])) 33SurrogateCasing.ToLower(source[i], source[i + 1], out char h, out char l); 34if (source[i] != h || source[i + 1] != l) 43if (ToLower(source[i]) != source[i]) 77if (char.IsHighSurrogate(source[i]) && i < s.Length - 1 && char.IsLowSurrogate(source[i + 1])) 79SurrogateCasing.ToUpper(source[i], source[i + 1], out char h, out char l); 80if (source[i] != h || source[i + 1] != l) 89if (ToUpper(source[i]) != source[i]) 118char c = source[i]; 121char cl = source[i + 1]; 144char c = source[i]; 147char cl = source[i + 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\JulianCalendar.cs (9)
100int monthDays = days[month] - days[month - 1]; 151while (n >= days[m]) 163return n - days[m - 1] + 1; 173int n = y * 365 + y / 4 + days[month - 1] + day - 1; 206int days = daysArray[m] - daysArray[m - 1]; 239return days[month] - days[month - 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (2)
223char c = s[i]; 243if ((uint)(i + 1) >= (uint)s.Length || !char.IsLowSurrogate(s[i + 1]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (2)
763if (s_ordinalLowerCasingClassRestoreChars.Contains(source[i])) 765destination[i] = source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (6)
184char c = source[i]; 193char cl = source[i + 1]; 238char c = source[i]; 247char cl = source[i + 1]; 496byte val = (byte)(s_casingTableInit[i / 8] >> (7 - (i % 8))); 527byte val = (byte)(s_casingTableInit[i / 8] >> (7 - (i % 8)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (5)
128while (ordinalDay > DaysToMonth[index]) 141return DaysToMonth[month]; 279int daysInMonth = DaysToMonth[month] - DaysToMonth[month - 1]; 294return DaysToMonth[MaxCalendarMonth - 1] + MaxCalendarDay;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (5)
320char ch = format[i]; 515switch (format[i]) 519if (inQuote && (quote == format[i])) 530quote = format[i]; 590sb.Append(format[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (10)
194int num = value[pos] - '0'; 205if ((uint)++pos >= (uint)value.Length || (uint)(digit = value[pos] - '0') > 9) 227int digit = value[pos] - '0'; 248while ((uint)++pos < (uint)value.Length && !char.IsAsciiDigit(value[pos])) 269_value[pos] : 592return powersOfTen[pow]; 1271char ch = format[i]; 1453if (span[i] != tokenizer.NextChar()) 1486str[pos] : 1493return i < 0 ? (char)0 : _str[_pos + i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (4)
232mapping[i] = new DateMapping(rawData[i * 4], rawData[i * 4 + 1], rawData[i * 4 + 2], rawData[i * 4 + 3]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (7)
756if ((uint)guidString.Length <= (uint)(numStart + numLen + 1) || guidString[numStart + numLen + 1] != TChar.CastFrom('{')) 813if (numStart + numLen + 1 >= guidString.Length || guidString[numStart + numLen + 1] != TChar.CastFrom('}')) 875for (; i < guidString.Length && guidString[i] == TChar.CastFrom('0'); i++) ; 881int c = int.CreateTruncating(guidString[i]); 922char c = charSpan[i]; 995str[i] == TChar.CastFrom('0') && 996(str[i + 1] | TChar.CastFrom(0x20)) == TChar.CastFrom('x');
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (3)
814result |= source[i]; 863if (isUnsigned == sbyte.IsNegative((sbyte)source[Size - 1])) 889result |= source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
404if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(short) - 1]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (3)
383result |= source[i]; 432if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(int) - 1])) 458result |= source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (3)
380result |= source[i]; 429if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(long) - 1])) 455result |= source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (3)
409result |= source[i]; 458if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(nint_t) - 1])) 484result |= source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemName.cs (4)
222nameChar = name[nameOffset++]; 249expressionChar = expression[expressionOffset]; 338expressionChar = expression[expressionOffset]; 427vsb.Append(span[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (22)
168while (end > rootLength && PathInternal.IsDirectorySeparator(path[end - 1])) 201char ch = path[i]; 333char ch = path[i]; 392ArgumentNullException.ThrowIfNull(paths[i], nameof(paths)); 394if (paths[i].Length == 0) 399if (IsPathRooted(paths[i])) 402maxSize = paths[i].Length; 406maxSize += paths[i].Length; 409char ch = paths[i][^1]; 419if (paths[i].Length == 0) 426builder.Append(paths[i]); 436builder.Append(paths[i]); 559string? path = paths[i]; 808chars[11] = (char)Base32Char[bytes[7] & 0x1F]; 811chars[0] = (char)Base32Char[b0 & 0x1F]; 812chars[1] = (char)Base32Char[b1 & 0x1F]; 813chars[2] = (char)Base32Char[b2 & 0x1F]; 814chars[3] = (char)Base32Char[b3 & 0x1F]; 815chars[4] = (char)Base32Char[b4 & 0x1F]; 836chars[7] = (char)Base32Char[b2]; 842chars[9] = (char)Base32Char[bytes[5] & 0x1F]; 843chars[10] = (char)Base32Char[bytes[6] & 0x1F];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\ReadOnlyMemoryStream.cs (1)
64return span[position];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
559if (_byteBuffer[i] != preamble[i]) 830char matchedChar = charBufferSpan[idxOfNewline];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
413_charBuffer[_charPos++] = buffer[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (1)
192char ch = remaining[foundLineLength];
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\WritableMemoryStream.cs (1)
62return span[position];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1416double power10 = RoundPower10Double[digits];
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
439float power10 = RoundPower10Single[digits];
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (73)
899if (!EqualityComparer<T>.Default.Equals(span[i], value)) 917if (!comparer.Equals(span[i], value)) 1003if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1004!EqualityComparer<T>.Default.Equals(span[i], value1)) 1022if (!comparer.Equals(span[i], value0) && 1023!comparer.Equals(span[i], value1)) 1115if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1116!EqualityComparer<T>.Default.Equals(span[i], value1) && 1117!EqualityComparer<T>.Default.Equals(span[i], value2)) 1134if (!comparer.Equals(span[i], value0) && 1135!comparer.Equals(span[i], value1) && 1136!comparer.Equals(span[i], value2)) 1249if (!values.Contains(span[i])) 1287if (!values.Contains(span[i], comparer)) 1477if (!EqualityComparer<T>.Default.Equals(span[i], value)) 1495if (!comparer.Equals(span[i], value)) 1581if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1582!EqualityComparer<T>.Default.Equals(span[i], value1)) 1600if (!comparer.Equals(span[i], value0) && 1601!comparer.Equals(span[i], value1)) 1693if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1694!EqualityComparer<T>.Default.Equals(span[i], value1) && 1695!EqualityComparer<T>.Default.Equals(span[i], value2)) 1713if (!comparer.Equals(span[i], value0) && 1714!comparer.Equals(span[i], value1) && 1715!comparer.Equals(span[i], value2)) 1829if (!values.Contains(span[i])) 1867if (!values.Contains(span[i], comparer)) 2285if (EqualityComparer<T>.Default.Equals(span[i], value)) 2302if (comparer.Equals(span[i], value)) 2490if (EqualityComparer<T>.Default.Equals(span[i], value)) 2508if (comparer.Equals(span[i], value)) 2730if (EqualityComparer<T>.Default.Equals(span[i], value0) || 2731EqualityComparer<T>.Default.Equals(span[i], value1)) 2748if (comparer.Equals(span[i], value0) || 2749comparer.Equals(span[i], value1)) 2835if (EqualityComparer<T>.Default.Equals(span[i], value0) || 2836EqualityComparer<T>.Default.Equals(span[i], value1) || 2837EqualityComparer<T>.Default.Equals(span[i], value2)) 2854if (comparer.Equals(span[i], value0) || 2855comparer.Equals(span[i], value1) || 2856comparer.Equals(span[i], value2)) 2994if (values.Contains(span[i], comparer)) 3150if (EqualityComparer<T>.Default.Equals(span[i], value0) || 3151EqualityComparer<T>.Default.Equals(span[i], value1)) 3169if (comparer.Equals(span[i], value0) || 3170comparer.Equals(span[i], value1)) 3256if (EqualityComparer<T>.Default.Equals(span[i], value0) || 3257EqualityComparer<T>.Default.Equals(span[i], value1) || 3258EqualityComparer<T>.Default.Equals(span[i], value2)) 3276if (comparer.Equals(span[i], value0) || 3277comparer.Equals(span[i], value1) || 3278comparer.Equals(span[i], value2)) 3416if (values.Contains(span[i], comparer)) 3506if (!EqualityComparer<T>.Default.Equals(span[i], other[i])) 3520if (!comparer.Equals(span[i], other[i])) 3565int c = comparer.Compare(span[i], other[i]); 4792destination[i] = EqualityComparer<T>.Default.Equals(source[i], oldValue) ? newValue : source[i]; 4806destination[i] = comparer.Equals(source[i], oldValue) ? newValue : source[i]; 4968if (!EqualityComparer<T>.Default.Equals(span[i], other[i])) 5000if (!comparer.Equals(span[i], other[i])) 5398while (startInclusive < endExclusive && char.IsWhiteSpace(source[startInclusive])) 5403while (endExclusive > startInclusive && char.IsWhiteSpace(source[endExclusive - 1])) 5515if (EqualityComparer<T>.Default.Equals(span[i], value)) 5534if (comparer.Equals(span[i], value)) 5854appended = handler.AppendFormatted(args[index], segment.Alignment, segment.Format);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (1)
21if (!char.IsWhiteSpace(span[i]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.MinMax.cs (6)
146value = span[i]; 157T next = span[i]; 177T next = span[i]; 188T next = span[i]; 245if (TMinMax.Compare(span[i], value)) 247value = span[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.cs (20)
138if (!trimElement.Equals(span[start])) 148if (span[start] != null) 175if (!trimElement.Equals(span[end])) 185if (span[end] != null) 480if (!trimElements.Contains(span[start])) 504if (!trimElements.Contains(span[end])) 586if (!char.IsWhiteSpace(span[start])) 595if (!char.IsWhiteSpace(span[end])) 613if (!char.IsWhiteSpace(span[start])) 631if (!char.IsWhiteSpace(span[end])) 650if (span[start] != trimChar) 659if (span[end] != trimChar) 678if (span[start] != trimChar) 697if (span[end] != trimChar) 735if (span[start] == trimChars[i]) 768if (span[end] == trimChars[i]) 845if (!char.IsWhiteSpace(span[start])) 868if (!char.IsWhiteSpace(span[end]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (8)
82char ch = input[i]; 119Rune.TryCreate(ch, input[i + 1], out Rune rune)) 207char ch = input[i]; 216if (entityLength >= 0 && inputSlice[entityLength] == ';') 282char ch = input[i]; 390byte b = source[i]; 983if (entity[i] > 0xFF) 988key = (key << 8) | entity[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (2)
945int pow10BigNumTableIndex = Pow10BigNumTableIndices[index]; 948ref BigInteger rhs = ref Unsafe.As<uint, BigInteger>(ref Unsafe.AsRef(in Pow10BigNumTable[pow10BigNumTableIndex]));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (3)
1796*(--p) = sNegative[i]; 2229*(--p) = sNegative[i]; 2659*(--p) = sNegative[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Grisu3.cs (8)
478uint power = SmallPowersOfTen[exponentGuess]; 484power = SmallPowersOfTen[exponentGuess]; 542if ((fractionals == 0) && ((requestedDigits >= 11) || (integrals < SmallPowersOfTen[requestedDigits - 1]))) 828Debug.Assert(minExponent <= CachedPowersBinaryExponent[index]); 829Debug.Assert(CachedPowersBinaryExponent[index] <= maxExponent); 831decimalExponent = CachedPowersDecimalExponent[index]; 832return new DiyFp(CachedPowersSignificand[index], CachedPowersBinaryExponent[index]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (3)
1022double scale = Pow10DoubleTable[fastExponent]; 1396ulong high = Math.BigMul(w, Pow5128Table[index], out ulong low); 1402ulong high2 = Math.BigMul(w, Pow5128Table[index + 1], out ulong _);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (28)
335num = TChar.CastToUInt32(value[index]); 355num = TChar.CastToUInt32(value[index]); 365num = TChar.CastToUInt32(value[index]); 377num = TChar.CastToUInt32(value[index]); 395num = TChar.CastToUInt32(value[index]); 406num = TChar.CastToUInt32(value[index]); 427num = TChar.CastToUInt32(value[index]); 458num = TChar.CastToUInt32(value[index]); 482num = TChar.CastToUInt32(value[index]); 515num = TChar.CastToUInt32(value[index]); 526num = TChar.CastToUInt32(value[index]); 587uint ch = TChar.CastToUInt32(value[index]); 657num = TChar.CastToUInt32(value[index]); 678num = TChar.CastToUInt32(value[index]); 697num = TChar.CastToUInt32(value[index]); 717num = TChar.CastToUInt32(value[index]); 734num = TChar.CastToUInt32(value[index]); 790uint ch = TChar.CastToUInt32(value[index]); 1212while (index < value.Length && IsWhite(TChar.CastToUInt32(value[index]))) 1234else if (info.AllowHyphenDuringParsing() && TChar.CastToUInt32(value[index]) == '-') 1256if (TChar.CastToUInt32(value[index]) != '0' || 1258(TChar.CastToUInt32(value[index + 1]) | 0x20) != 'x') 1285uint ch = TChar.CastToUInt32(value[index]); 1327uint ch = TChar.CastToUInt32(value[index]); 1370if (index < value.Length && ((TChar.CastToUInt32(value[index]) | 0x20) == 'p')) 1388else if (info.AllowHyphenDuringParsing() && TChar.CastToUInt32(value[index]) == '-') 1407uint ech = TChar.CastToUInt32(value[index]); 1446while (index < value.Length && IsWhite(TChar.CastToUInt32(value[index])))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (2)
298static uint IDecimalIeee754ParseAndFormatInfo<Decimal32, uint>.Power10(int exponent) => UInt32Powers10[exponent]; 302uint power = UInt32Powers10[exponent];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (2)
299static ulong IDecimalIeee754ParseAndFormatInfo<Decimal64, ulong>.Power10(int exponent) => UInt64Powers10[exponent]; 303ulong power = UInt64Powers10[exponent];
src\runtime\src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (15)
50if (s[i] == '-') 61else if (s[i] == '+') 66if ((radix == -1 || radix == 16) && (i + 1 < length) && s[i] == '0') 68if (s[i + 1] == 'x' || s[i + 1] == 'X') 138if (s[i] == '-') 149else if (s[i] == '+') 155if ((radix == -1 || radix == 16) && (i + 1 < length) && s[i] == '0') 157if (s[i + 1] == 'x' || s[i + 1] == 'X') 208for (; localIndex < s.Length && char.IsWhiteSpace(s[localIndex]); localIndex++) ; 223while (i < s.Length && IsDigit(s[i], radix, out int value)) 250while (i < s.Length && IsDigit(s[i], radix, out int value)) 284while (i < s.Length && IsDigit(s[i], radix, out int value)) 309while (i < s.Length && IsDigit(s[i], radix, out int value))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
529destination[i] = choices[randomBytes[i] & mask]; 566destination[i++] = choices[masked]; 580destination[i] = choices[Next(choices.Length)];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (1)
52Type c = p[i].ParameterType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
136parameterTypes[i] = paramInfo[i].ParameterType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (3)
122parameter.Name == parameters[i].Name) 124return parameters[i]; 214ParameterInfo parameter = parameters[parameters.Length - 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (2)
85return args[PositionImpl]; 94return args[PositionImpl];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeNameResolver.cs (1)
112Type? genericArg = Resolve(genericArgs[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (1)
435yield return memory.Span[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (2)
352result = (sbyte)source[source.Length - sizeof(sbyte)]; 394if (isUnsigned == IsNegative((sbyte)source[sizeof(sbyte) - 1]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (1)
51int c = values[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticWithAsciiCharSearchValues.cs (4)
76if ((uint)offset >= (uint)span.Length || char.IsAscii(span[offset])) 114if ((uint)offset >= (uint)span.Length || char.IsAscii(span[offset])) 175if ((uint)offset >= (uint)span.Length || char.IsAscii(span[offset])) 203if ((uint)offset >= (uint)span.Length || char.IsAscii(span[offset]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (1)
54frequency += CharacterFrequencyHelper.AsciiFrequency[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickBuilder.cs (2)
31Debug.Assert(values[i - 1].Length <= values[i].Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
113float newFrequency = char.IsAscii(childChar) ? CharacterFrequencyHelper.AsciiFrequency[childChar] : -1;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\CharacterFrequencyHelper.cs (3)
96char c = span[i]; 101float frequency = AsciiFrequency[c]; 106frequency += AsciiFrequency[c ^ 0x20];
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyBucketizer.cs (3)
24string value = values[i]; 92string value = values[i]; 126strings[count++] = values[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValuesBase.cs (2)
59if (TNegator.NegateIfNeeded(ContainsCore(span[i]))) 73if (TNegator.NegateIfNeeded(ContainsCore(span[i])))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (1)
334sb.Append(span.Slice(0, pos)).Append(GetEscapeSequence(span[pos]));
src\runtime\src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
129if (startupHookPart.Contains(disallowedSimpleAssemblyNameChars[j]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (26)
123object? value = args[i]; 431string? value = values[i]; 454string? value = values[i]; 704handler.AppendFormatted(args[index], segment.Alignment, segment.Format); 919object? value = values[i]; 1100if (values[i] is string value) 1446int replacementIdx = indices[r]; 1618if (text[idx] == '\r') 1621if ((uint)nextCharIdx < (uint)text.Length && text[nextCharIdx] == '\n') 1635else if (replacementText.Length != 1 || replacementText[0] != text[idx]) 1666stride = remaining[idx] == '\r' && (uint)(idx + 1) < (uint)remaining.Length && remaining[idx + 1] == '\n' ? 2 : 1; 1960splitStrings[arrIndex++] = Substring(currIndex, sepList[i] - currIndex); 1961currIndex = sepList[i] + (lengthList.IsEmpty ? defaultLength : lengthList[i]); 2000thisEntry = this.AsSpan(currIndex, sepList[i] - currIndex); 2009currIndex = sepList[i] + (lengthList.IsEmpty ? defaultLength : lengthList[i]); 2019thisEntry = this.AsSpan(currIndex, sepList[i] - currIndex); 2028currIndex = sepList[i] + (lengthList.IsEmpty ? defaultLength : lengthList[i]); 2067if (char.IsWhiteSpace(source[i])) 2089char c = source[i]; 2106if (ProbabilisticMap.Contains(ref charMap, separators, source[i])) 2458string? separator = separators[j]; 2464if (source[i] == separator[0] && currentSepLength <= source.Length - i)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Trimming.cs (2)
59uint elementValueM1 = uint.CreateTruncating(value[start]) - 1; 72uint elementValueM1 = uint.CreateTruncating(value[end]) - 1;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\CompositeFormat.cs (4)
150char brace = format[pos]; 184Debug.Assert(format[pos - 1] == '{'); 316Debug.Assert(format[pos] == '}'); 349nextChar = format[pos];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (2)
389dest[total++] = srcLeft[i]; 401dest[total++] = srcRight[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderLatin1BestFitFallback.cs (4)
138char cTest = ArrayCharBestFit[index]; 144return ArrayCharBestFit[index + 1]; 160if (ArrayCharBestFit[index] == cUnknown) 165return ArrayCharBestFit[index + 1];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (18)
58result = string.CompareOrdinal(invariantName, EncodingNames.AsSpan(EncodingNameIndices[index], EncodingNameIndices[index + 1] - EncodingNameIndices[index])); 63return CodePagesByName[index]; 81if (invariantName.SequenceEqual(EncodingNames.AsSpan(EncodingNameIndices[left], EncodingNameIndices[left + 1] - EncodingNameIndices[left]))) 83return CodePagesByName[left]; 107int codePage = mappedCodePages[i]; 115webNames[webNameIndices[i]..webNameIndices[i + 1]], 133int codePage = mappedCodePages[i]; 142encodingInfoList[codePage] = new EncodingInfo(codePage, webNames[webNameIndices[i]..webNameIndices[i + 1]], 216int uiFamilyCodePage = UiFamilyCodePages[index]; 217string webName = WebNames[WebNameIndices[index]..WebNameIndices[index + 1]]; 222uint flags = Flags[index];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (7)
592char finalChar = source[index]; 608char penultimateChar = source[index]; 652uint tempValue = source[index]; 690if ((sbyte)source[index] >= -64) 1318return (UnicodeCategory)(AsciiCharInfo[value.Value] & UnicodeCategoryMask); 1419return (AsciiCharInfo[value.Value] & IsLetterOrDigitFlag) != 0; 1482return (AsciiCharInfo[value.Value] & IsWhiteSpaceFlag) != 0;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\SpanLineEnumerator.cs (2)
61if (remaining[idx] == '\r' && (uint)(idx + 1) < (uint)remaining.Length && remaining[idx + 1] == '\n')
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (7)
1344if (values[i] != null) 1346Append(values[i]!.ToString()); 1776object? arg = args[index]; 1996handler.AppendFormatted(args[index], segment.Alignment, segment.Format); 2491int gapStart = replacements[i] + removeCount; 2498int gapEnd = replacements[i]; 2547if (value[i] != chunk.m_ChunkChars[indexInChunk])
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (1)
297destination[i] = (char)(0xDF00 | source[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\ValueStringBuilder.AppendFormat.cs (1)
198object? arg = args[index];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
949if (tokens[i].CanBeCanceled) 951_linkingRegistrations[i] = tokens[i].UnsafeRegister(s_linkedTokenCancelDelegate, this);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
5143Task task = tasks[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (6)
250WaitHandle waitHandle = waitHandles[i] ?? throw new ArgumentNullException($"waitHandles[{i}]", SR.ArgumentNull_ArrayElement); 339throw new AbandonedMutexException(waitResult, waitHandles[waitResult]); 379Debug.Assert(safeWaitHandles[i] != null); 380unsafeWaitHandles[i] = safeWaitHandles[i].DangerousGetHandle(); 389Debug.Assert(safeWaitHandles[i] != null); 390unsafeWaitHandles[i] = safeWaitHandles[i].DangerousGetHandle();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.Unix.cs (2)
398Debug.Assert(waitHandles[i] != IntPtr.Zero); 399IWaitableObject waitableObjectMaybe = HandleManager.FromHandle(waitHandles[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (12)
938if ((uint)index >= (uint)date.Length || !char.IsAsciiDigit(date[index])) 947julianDay = julianDay * 10 + (int)(date[index] - '0'); 949} while ((uint)index < (uint)date.Length && char.IsAsciiDigit(date[index])); 953if (julianDay == 0 || julianDay > days[days.Length - 1]) 959while (i < days.Length && julianDay > days[i]) 967day = julianDay - days[i - 1]; 1030if (index < posixFormat.Length && posixFormat[index] == ',') 1035if (index < posixFormat.Length && posixFormat[index] == ',') 1048bool isBracketEnclosed = index < posixFormat.Length && posixFormat[index] == '<'; 1057if (index < posixFormat.Length && posixFormat[index] == '>') 1081if (index < posixFormat.Length && posixFormat[index] == '/') 1099char current = posixFormat[index];
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
65if ((AsciiBitmap[value] & (1 << (c & 7))) == 0)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (2)
1140result |= source[i]; 1189UInt128 part = source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
376result |= source[i]; 425uint part = source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
383result |= source[i]; 432ulong part = source[i];
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
384result |= source[i]; 433nuint part = source[i];
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (8)
43if (input[offset] == EscapeCharacter) // this is very rare (IL Emit or pure IL) 48isNestedType = offset > 0 && offset < input.Length && input[offset] == '+'; 56char c = input[offset]; 62!s_endOfFullTypeNameDelimiterChars.Contains(input[offset])) // invalid name, escapes a char that does not need escaping 82if (index > 0 && fullName[index - 1] == '.') 136if (offset > 0 && input[offset - 1] == EscapeCharacter) // this should be very rare (IL Emit & pure IL) 148if (input[offset] is ']') 150if (input[offset - 1] != EscapeCharacter)
System\Reflection\DynamicInvokeInfo.cs (1)
76Type argumentType = parameters[i].ParameterType;
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (4)
104Type parameterType1 = p1[i].ParameterType; 105Type parameterType2 = p2[i].ParameterType; 118Type parameterType1 = p1[i].ParameterType; 119Type parameterType2 = p2[i].ParameterType;
System\Reflection\Runtime\BindingFlagSupport\Shared.cs (3)
85if (!parameterInfos[argumentTypes.Length].IsOptional) 103ParameterInfo lastParameter = parameterInfos[parameterInfos.Length - 1]; 130if (argumentTypes[i] is not null && !argumentTypes[i].MatchesParameterTypeExactly(parameterInfos[i]))
System\Reflection\Runtime\CustomAttributes\RuntimeCustomAttributeData.cs (1)
82if (!parameterTypes[i].Equals(candidateParameters[i]))
System\Reflection\Runtime\General\MetadataReaderExtensions.NativeFormat.cs (2)
494string namespacePart = namespaceParts[idx]; 517string namespacePart = namespaceParts[idx];
System\Reflection\Runtime\MethodInfos\CustomMethodInvoker.cs (1)
53convertedArguments[i] = RuntimeAugments.CheckArgument(arguments[i], _parameterTypes[i].TypeHandle, binderBundle, out copyBack);
System\Reflection\Runtime\MethodInfos\CustomMethodMapper.cs (1)
37parameterTypes[i] = parameterInfos[i].ParameterType;
System\Reflection\TypeNameResolver.NativeAot.cs (4)
217type = type.GetNestedType(nestedTypeNames[i], bindingFlags); 225if (nt.Name.Equals(nestedTypeNames[i], StringComparison.InvariantCultureIgnoreCase)) 238nestedTypeNames[i], (i > 0) ? nestedTypeNames[i - 1] : TypeName.Unescape(escapedTypeName)),
System.Private.DataContractSerialization (34)
_generated\0\RegexGenerator.g.cs (7)
270while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 288while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1])) 306while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 324while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3])) 342while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4])) 364while ((uint)iteration5 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration5])) 393if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Runtime\Serialization\Json\XmlJsonReader.cs (2)
1068if ((CharTypes[currentCharacter] & CharType.FirstName) == 0) 1077if ((CharTypes[currentCharacter] & CharType.Name) == 0 || currentCharacter >= 0x80)
System\Xml\XmlUTF8TextReader.cs (17)
600while (!BufferReader.EndOfFile && (CharTypeMap[BufferReader.GetByte()] & CharType.Whitespace) != 0) 614(CharTypeMap[buffer[offset + 4]] & CharType.Whitespace) == 0) 637if ((CharTypeMap[ch] & CharType.Whitespace) == 0) 685if ((CharTypeMap[ch] & CharType.FirstName) == 0) 692if ((CharTypeMap[ch] & CharType.Name) == 0) 716if ((CharTypeMap[ch] & CharType.FirstName) == 0) 723if ((CharTypeMap[ch] & CharType.Name) == 0) 756while (offset < offsetMax && (charTypeMap[buffer[offset]] & CharType.AttributeText) != 0) 860while ((CharTypeMap[ch] & CharType.Whitespace) != 0) 954while ((CharTypeMap[ch] & CharType.Whitespace) != 0) 1020if ((CharTypeMap[b] & CharType.Comment) == 0) 1134while (offset < offsetMax && (charTypeMap[buffer[offset]] & CharType.SpecialWhitespace) != 0) 1143while (offset < offsetMax && (charTypeMap[buffer[offset]] & CharType.Text) != 0) 1154while (offset < offsetMax && ((charTypeMap[buffer[offset]] & CharType.Text) != 0 || buffer[offset] == 0xEF)) 1282if (ch < 256 && (CharTypeMap[ch] & CharType.Whitespace) != 0) 1341else if ((CharTypeMap[ch] & CharType.SpecialWhitespace) != 0) 1349else if ((CharTypeMap[ch] & CharType.Text) != 0)
System.Private.StackTraceMetadata (4)
src\runtime\src\libraries\Common\src\Internal\VersionResilientHashCode.cs (4)
45_hash1 = unchecked(_hash1 + RotateLeft(_hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 48_hash2 = unchecked(_hash2 + RotateLeft(_hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]); 87hash1 = unchecked(hash1 + RotateLeft(hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 90hash2 = unchecked(hash2 + RotateLeft(hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]);
System.Private.TypeLoader (6)
Internal\TypeSystem\RuntimeNoMetadataType.cs (1)
50GenericVariance variance = runtimeVarianceData.Length == 0 ? GenericVariance.None : runtimeVarianceData[i] switch
src\runtime\src\coreclr\tools\Common\Internal\Text\Utf8Span.cs (1)
38int ch = _value[i];
src\runtime\src\libraries\Common\src\Internal\VersionResilientHashCode.cs (4)
45_hash1 = unchecked(_hash1 + RotateLeft(_hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 48_hash2 = unchecked(_hash2 + RotateLeft(_hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]); 87hash1 = unchecked(hash1 + RotateLeft(hash1, 5)) ^ (int)unchecked((sbyte)src[i]); 90hash2 = unchecked(hash2 + RotateLeft(hash2, 5)) ^ (int)unchecked((sbyte)src[i + 1]);
System.Private.Uri (126)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (6)
46for (; (start < end) && (ch = ToUShort(str[start])) != '.' && ch != ':'; ++start) 140int ch = ToUShort(name[start]); 164(uint)(start + 1) < (uint)name.Length && char.IsAsciiDigit((char)ToUShort(name[start + 1]))) 223ch = ToUShort(name[current]); 237ch = ToUShort(name[current]); 256ch = ToUShort(name[current]);
src\runtime\src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (28)
23if (numbers[i] == 0) 119if (start < end && name[start] == TChar.CreateTruncating('[')) 131if (name[start] == TChar.CreateTruncating(':') && (start + 1 >= end || name[start + 1] != TChar.CreateTruncating(':'))) 139int currentCh = IPv4AddressHelper.ToUShort(name[i]); 168if (name[i] == TChar.CreateTruncating(']')) 172else if (name[i] == TChar.CreateTruncating('/')) 188if (i + 1 < end && name[i + 1] != TChar.CreateTruncating(':')) 195if (i + 3 < end && name[i + 2] == TChar.CreateTruncating('0') && name[i + 3] == TChar.CreateTruncating('x')) 200int ch = IPv4AddressHelper.ToUShort(name[i]); 213if (!char.IsAsciiDigit((char)IPv4AddressHelper.ToUShort(name[i]))) 223if ((i > 0) && (name[i - 1] == TChar.CreateTruncating(':'))) 327for (int i = (address[0] == TChar.CreateTruncating('[') ? 1 : 0); i < address.Length && address[i] != TChar.CreateTruncating(']');) 329currentCh = IPv4AddressHelper.ToUShort(address[i]); 343for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']') && address[i] != TChar.CreateTruncating('/'); ++i) 349for (; i < address.Length && address[i] != TChar.CreateTruncating(']'); ++i) 359if (address[i] == TChar.CreateTruncating(':')) 375(address[j] != TChar.CreateTruncating(']')) && 376(address[j] != TChar.CreateTruncating(':')) && 377(address[j] != TChar.CreateTruncating('%')) && 378(address[j] != TChar.CreateTruncating('/')) && 382if (address[j] == TChar.CreateTruncating('.')) 390while (j < address.Length && (address[j] != TChar.CreateTruncating(']')) && (address[j] != TChar.CreateTruncating('/')) && (address[j] != TChar.CreateTruncating('%'))) 416for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']'); i++)
System\DomainNameHelper.cs (1)
108char c = hostname[invalidCharOrDelimiterIndex];
System\IPv6AddressHelper.cs (6)
145if (char.IsAsciiHexDigit(name[i])) 163switch (name[i]) 174if (name[i] == ']') 181if (name[i] != '%' && !UriHelper.Unreserved.Contains(name[i])) 200if ((i > 0) && (name[i - 1] == ':'))
System\IriHelper.cs (7)
80char ch = span[i]; 86ch = UriHelper.DecodeHexChars(span[i + 1], span[i + 2]); 92dest.Append(span[i]); 93dest.Append(span[i + 1]); 94dest.Append(span[i + 2]); 130ch2 = span[i + 1];
System\PercentEncodingHelper.cs (3)
32if ((uint)(input.Length - i) <= 2 || input[i] != '%') 35uint value = input[i + 1]; 46uint second = (uint)input[i + 2] - '0';
System\UncNameHelper.cs (22)
48if (char.IsLetter(name[i]) || name[i] == '-' || name[i] == '_') 52else if (name[i] == '/' || name[i] == '\\' || (notImplicitFile && (name[i] == ':' || name[i] == '?' || name[i] == '#'))) 56else if (name[i] == '.') 61else if (!char.IsAsciiDigit(name[i])) 74if (name[i] == '/' || name[i] == '\\' || (notImplicitFile && (name[i] == ':' || name[i] == '?' || name[i] == '#'))) 78else if (name[i] == '.') 80if (!validShortName || name[i - 1] == '.') 85else if (name[i] == '-' || name[i] == '_') 90else if (char.IsLetter(name[i]) || char.IsAsciiDigit(name[i])) 103if ((uint)(i - 1) >= (uint)name.Length || name[i - 1] != '.')
System\Uri.cs (35)
1993while (!str.IsEmpty && UriHelper.IsLWS(str[str.Length - 1])) 2021if (str[i] is not ('\\' or '/')) 2036if ((uint)(i + 1) < (uint)str.Length && str[i + 1] is ':' or '|' && char.IsAsciiLetter(str[i])) 2038if ((uint)(i + 2) >= (uint)str.Length || str[i + 2] is not ('\\' or '/')) 2068(uint)i < (uint)str.Length && str[i] is not ('?' or '#')) 2075else if (!OperatingSystem.IsWindows() && _syntax.InFact(UriSyntaxFlags.FileLikeUri) && str[i - 1] == '/' && i - idx == 3) 2091char first = str[idx]; 2092char second = str[idx + 1]; 2171char hostTerminator = str[idx]; 3172Debug.Assert(str[_syntax.SchemeName.Length] == ':'); 3474if ((uint)pathLength >= (uint)original.Length || original[pathLength] == '#') 3692if ((uint)startOffset >= (uint)str.Length || ((ch = str[startOffset]) == '/' || (ch == '\\' && (syntaxFlags & UriSyntaxFlags.FileLikeUri) != 0) || ch == '#' || ch == '?')) 3717if ((uint)userInfoLength < (uint)slice.Length && slice[userInfoLength] == '@' && (uint)(++userInfoLength) < (uint)slice.Length) 3719ch = slice[userInfoLength]; 3742str[delimiterIdx] is not ('/' or '\\') && 3743(IsImplicitFile || str[delimiterIdx] is not (':' or '?' or '#'))) 3824char hostDelimiter = (uint)endOfHost < (uint)str.Length ? str[endOfHost] : '\0'; 3850int val = str[i] - '0'; 3937if (dotFound && (str[endOfHost] == '/' || str[endOfHost] == '?' || str[endOfHost] == '#')) 3940if (endOfHost < (i + 2) && str[endOfHost] == '.') 4023char c = span[i]; 4047valid = IriHelper.CheckIriUnicodeRange(c, span[i + 1], out _, true); 4100if ((uint)(i + 1) < (uint)span.Length && (span[i + 1] == '/' || span[i + 1] == '\\')) 4107if (((uint)(i + 1) >= (uint)span.Length || span[i + 1] == '.' || span[i + 1] == '/' || span[i + 1] == '\\' || span[i + 1] == '?' || span[i + 1] == '#')) 4135if ((uint)(i + 2) < (uint)span.Length && (c = UriHelper.DecodeHexChars(span[i + 1], span[i + 2])) != c_DummyChar) 4208if (dosPathIdx != 0 && str[dosPathIdx + _info.Offset.Path - 1] == '|')
System\UriHelper.cs (10)
68chSelf = self[i]; 69chOther = other[i]; 121if ((chSelf = self[i]) == '?' || chSelf == '#') 323if (chars[i] == '%' && (uint)(i + 2) < (uint)chars.Length) 325char unescaped = DecodeHexChars(chars[i + 1], chars[i + 2]); 385ch = chars[i]; 396ch = DecodeHexChars(chars[i + 1], chars[i + 2]); 471PercentEncodeByte((byte)chars[i], ref dest);
System.Private.Windows.Core (5)
System\IO\Compression\RunLengthEncoder.cs (1)
46length += encoded[i];
Windows\Win32\Graphics\Gdi\ARGB.cs (1)
50colors[i] = argbColors[i];
Windows\Win32\System\Com\SAFEARRAY.cs (3)
87dimensionSize *= bounds[boundIndex--].cElements; 89int diff = (indices[indicesIndex++] - bounds[boundIndex].lLbound); 93cell += (uint)(c1 - bounds[cDims - 1].lLbound);
System.Private.Windows.GdiPlus (2)
System\Drawing\ImageCodecInfoHelper.cs (2)
56s_encoders[i] = (codecInfo[i].FormatID, codecInfo[i].Clsid);
System.Private.Xml (58)
_generated\0\RegexGenerator.g.cs (4)
528if ((uint)(pos - 1) >= inputSpan.Length || inputSpan[pos - 1] != '_') 678while (iteration < 8 && (uint)iteration < (uint)slice.Length && char.IsAsciiLetter(slice[iteration])) 732while (iteration1 < 8 && (uint)iteration1 < (uint)slice.Length && char.IsAsciiLetterOrDigit(slice[iteration1])) 763if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Xml\Base64Decoder.cs (5)
130char ch = chars[iChar]; 145if (ch >= mapBase64.Length || (digit = mapBase64[ch]) == Invalid) 166if ((uint)iChar < (uint)chars.Length && chars[iChar] == '=') 173} while ((uint)iChar < (uint)chars.Length && chars[iChar] == '='); 178char ch = chars[iChar++];
System\Xml\BinaryXml\SqlUtils.cs (2)
131return RgCLenFromPrec[bPrec - 1]; 765return timeTicks * KatmaiTimeScaleMultiplicator[scale];
System\Xml\BinaryXml\XmlBinaryReader.cs (1)
3604return XsdKatmaiTimeScaleToValueLengthMap[scale];
System\Xml\BinHexDecoder.cs (1)
152char ch = chars[iChar];
System\Xml\Core\ReadOnlyTernaryTree.cs (8)
143int charToFind = stringToFind[stringPos]; 158int charInTheTree = nodeBuffer[pos + (int)TernaryTreeByte.CharacterByte]; 163if (nodeBuffer[pos + (int)TernaryTreeByte.LeftTree] == 0x0) 168nodePos += nodeBuffer[pos + (int)TernaryTreeByte.LeftTree]; 173if (nodeBuffer[pos + (int)TernaryTreeByte.RightTree] == 0x0) 178nodePos += nodeBuffer[pos + (int)TernaryTreeByte.RightTree]; 185return nodeBuffer[pos + (int)TernaryTreeByte.Data]; 200charToFind = stringToFind[stringPos];
System\Xml\Core\XmlTextEncoder.cs (3)
258while (i < len && XmlCharType.IsAttributeValueChar(ch = text[i])) 355throw XmlConvert.CreateInvalidSurrogatePairException(text[i], ch); 371while (i < len && XmlCharType.IsAttributeValueChar(ch = text[i]))
System\Xml\Core\XmlTextReaderImpl.cs (2)
9600switch (chars[i]) 9614if ((uint)nextIdx < (uint)chars.Length && chars[nextIdx] == '\n')
System\Xml\Schema\XsdBuilder.cs (4)
2530if ((r & DerivationMethodValues[j]) != 0 && (r & DerivationMethodValues[j]) != DerivationMethodValues[j]) 2535r |= DerivationMethodValues[j];
System\Xml\Schema\XsdDateTime.cs (3)
631while (n >= days[month]) 634day = n - days[month - 1] + 1; 997fraction *= Power10[MaxFractionDigits - fractionDigits];
System\Xml\XmlCharType.cs (2)
151char c = str[i]; 154if ((uint)(i + 1) >= (uint)str.Length || !char.IsSurrogatePair(c, str[i + 1]))
System\Xml\XPath\Internal\XPathScanner.cs (2)
337for (i = 1; i < span.Length && XmlCharType.IsNCNameSingleChar(span[i]); i++); 341_currentChar = span[i];
System\Xml\Xsl\Runtime\NumberFormatter.cs (2)
114while (number >= RomanDigitValue[idx]) 116number -= RomanDigitValue[idx];
System\Xml\Xsl\XPathConvert.cs (11)
995if (dblInt >= C10toN[iT + 8]) 999if (dblInt >= C10toN[iT + 4]) 1003if (dblInt >= C10toN[iT + 2]) 1007if (dblInt >= C10toN[iT + 1]) 1012Debug.Assert(dblInt >= C10toN[iT] && dblInt < C10toN[iT + 1]); 1018bHH = (byte)(dblInt / C10toN[iT]); 1019dblInt -= bHH * C10toN[iT]; 1020Debug.Assert(dblInt == Math.Floor(dblInt) && 0 <= dblInt && dblInt < C10toN[iT]); 2510dbl *= C10toN[scale - 22]; 2515dbl *= C10toN[scale];
System.Reflection.Emit (14)
System\Reflection\Emit\CustomAttributeWrapper.cs (14)
65int namedType = binaryAttribute[pos++]; 66int dataType = binaryAttribute[pos++]; 103if ((data[pos] & 0x80) == 0) 105len = (data[pos++] & OneByteMask); 107else if ((data[pos] & 0x40) == 0) 109len = ((data[pos] & TwoByteMask) << 8) + data[pos + 1]; 114len = ((data[pos] & FourByteMask) << 24) + (data[pos + 1] << 16) + (data[pos + 2] << 8) + data[pos + 3]; 126if (data[pos] == NullValue) 142return (data[pos] == 0) ? false : true; 144int subtype = data[pos];
System.Reflection.Metadata (19)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
349ch = _input[_index++];
System\Reflection\Internal\Utilities\Hash.cs (1)
44hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
System\Reflection\Internal\Utilities\MemoryBlock.cs (1)
342return i >= 0 && span[i] == asciiChar ?
System\Reflection\Metadata\TypeNameParserHelpers.cs (8)
43if (input[offset] == EscapeCharacter) // this is very rare (IL Emit or pure IL) 48isNestedType = offset > 0 && offset < input.Length && input[offset] == '+'; 56char c = input[offset]; 62!s_endOfFullTypeNameDelimiterChars.Contains(input[offset])) // invalid name, escapes a char that does not need escaping 82if (index > 0 && fullName[index - 1] == '.') 136if (offset > 0 && input[offset - 1] == EscapeCharacter) // this should be very rare (IL Emit & pure IL) 148if (input[offset] is ']') 150if (input[offset - 1] != EscapeCharacter)
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Modules\GetTypeCoreCache.cs (1)
52hashCode = (hashCode << 8) ^ name[i];
System.Resources.Extensions (1)
System\Resources\Extensions\TypeNameComparer.cs (1)
129hashCode = HashHelpers.Combine(hashCode, typeName[i].GetHashCode());
System.Runtime.InteropServices.JavaScript (1)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (1)
155var type = signature.Sigs[i] = types[i + 1]._signatureType;
System.Runtime.Numerics (89)
src\runtime\src\libraries\Common\src\System\Number.Formatting.Common.cs (4)
98while ((uint)i < (uint)format.Length && char.IsAsciiDigit(format[i])) 105n = (n * 10) + format[i++] - '0'; 110if ((uint)i >= (uint)format.Length || format[i] == '\0') 807*(p--) = sGroup[j];
System\Number.BigInteger.cs (19)
155if (!IsWhite(TChar.CastToUInt32(value[index]))) 168while ((validLength < value.Length) && TParser.IsValidDigit(TChar.CastToUInt32(value[validLength]))) 180while ((trailingStart < value.Length) && IsWhite(TChar.CastToUInt32(value[trailingStart]))) 536nuint multiplier = UInt32PowersOfTen[remainingTrailingZeroCount]; 557nuint carry = MultiplyAdd(bits.Slice(0, resultLength), PowersOf1e9.TenPowMaxPartial, base1E9[i]); 999bufferEnd = UInt32ToDecChars(bufferEnd, (uint)base1E9Value[i], PowersOf1e9.MaxPartialDigits); 1098ulong limb = bits[iuSrc]; 1104NaiveDigit((uint)bits[iuSrc], base1E9Buffer, ref base1E9Written); 1363Debug.Assert(2 * src.Length - (Indexes[i + 1] - Indexes[i]) is 0 or 1); 1384toExclusive = Indexes[i + 1]; 1398bufferSize = Indexes[index]; 1412int from = Indexes[index]; 1413int toExclusive = Indexes[index + 1]; 1435if (size < Indexes[i + 1] - Indexes[i]) 1445bufferSize = Indexes[maxIndex + 1] + 1; 1453BigIntegerCalculator.Multiply(left, UInt32PowersOfTen[trailingZeroCount], bits.Slice(0, left.Length + 1)); 1515nuint multiplier = UInt32PowersOfTen[remainingTrailingZeroCount];
System\Numerics\BigInteger.cs (5)
340byte mostSignificantByte = isBigEndian ? value[0] : value[byteCount - 1]; 380_sign = (_sign << 8) | value[i]; 387_sign = (_sign << 8) | value[i]; 451byte curByteValue = value[curByte]; 459byte curByteValue = value[curByte];
System\Numerics\BigIntegerCalculator.AddSub.cs (12)
40_ = left[right.Length - 1]; 47bits[i] = AddWithCarry(left[i], right[i], carry, out carry); 67left[i] = AddWithCarry(left[i], right[i], carry, out carry); 96_ = left[right.Length - 1]; 103bits[i] = SubWithBorrow(left[i], right[i], borrow, out borrow); 123left[i] = SubWithBorrow(left[i], right[i], borrow, out borrow); 150nuint sum = left[i] + carry; 161nuint sum = left[i] + carry; 200nuint val = left[i]; 210nuint val = left[i];
System\Numerics\BigIntegerCalculator.Bitwise.cs (1)
78mag = (uint)i < (uint)bits.Length ? bits[i] : 0;
System\Numerics\BigIntegerCalculator.DivRem.cs (3)
45quotient[i] = DivRem(carry, left[i], right, out nuint rem); 58DivRem(carry, left[i], right, out carry); 279leftElement = AddWithCarry(leftElement, right[i], carry, out carry);
System\Numerics\BigIntegerCalculator.FastReducer.cs (1)
130left[i] = SubWithBorrow(left[i], right[i], borrow, out borrow);
System\Numerics\BigIntegerCalculator.PowMod.cs (7)
174nuint p = power[i]; 461nuint topLimb = value[length - 1]; 692UInt128 p = (UInt128)m * modulus[j] + value[i + j] + carry; 698ulong p = (ulong)m * modulus[j] + value[i + j] + carry; 727upper[j] = SubWithBorrow(upper[j], modulus[j], borrow, out borrow); 752nuint p = power[i]; 814nuint p = power[i];
System\Numerics\BigIntegerCalculator.SquMul.cs (14)
165nuint v = value[i]; 169UInt128 digit2 = (UInt128)(ulong)value[j] * (ulong)v; 187nuint v = value[i]; 191ulong digit2 = (ulong)value[j] * v; 531nuint carry = MulAdd1(bits.Slice(i), left, right[i]); 879_ = left[right.Length - 1]; 889Int128 digit = (Int128)(ulong)core[i] + carry - (ulong)left[i] - (ulong)right[i]; 896Int128 digit = (Int128)(ulong)core[i] + carry - (ulong)left[i]; 914long digit = ((uint)core[i] + carry) - (uint)left[i] - (uint)right[i]; 921long digit = ((uint)core[i] + carry) - (uint)left[i]; 992left[j] = SubWithBorrow(right[j], left[j], borrow, out borrow); 1036left[j] = SubWithBorrow(right[j], left[j], borrow, out borrow);
System\Numerics\BigIntegerCalculator.Utils.cs (23)
31while (--iv >= 0 && left[iv] == right[iv]) ; 38return left[iv] < right[iv] ? -1 : 1; 75while (length > 0 && value[length - 1] == 0) 230UInt128 p0 = (UInt128)(ulong)left[i] * (ulong)multiplier + (ulong)carry; 233UInt128 p1 = (UInt128)(ulong)left[i + 1] * (ulong)multiplier + (ulong)(p0 >> 64); 236UInt128 p2 = (UInt128)(ulong)left[i + 2] * (ulong)multiplier + (ulong)(p1 >> 64); 239UInt128 p3 = (UInt128)(ulong)left[i + 3] * (ulong)multiplier + (ulong)(p2 >> 64); 247UInt128 product = (UInt128)(ulong)left[i] * (ulong)multiplier + (ulong)carry; 256ulong product = (ulong)left[i] * multiplier + carry; 284UInt128 p0 = (UInt128)(ulong)left[i] * (ulong)multiplier + (ulong)result[i] + (ulong)carry; 287UInt128 p1 = (UInt128)(ulong)left[i + 1] * (ulong)multiplier + (ulong)result[i + 1] + (ulong)(p0 >> 64); 290UInt128 p2 = (UInt128)(ulong)left[i + 2] * (ulong)multiplier + (ulong)result[i + 2] + (ulong)(p1 >> 64); 293UInt128 p3 = (UInt128)(ulong)left[i + 3] * (ulong)multiplier + (ulong)result[i + 3] + (ulong)(p2 >> 64); 301UInt128 product = (UInt128)(ulong)left[i] * (ulong)multiplier + (ulong)result[i] + (ulong)carry; 310ulong product = (ulong)left[i] * multiplier 336UInt128 prod0 = (UInt128)(ulong)right[i] * (ulong)multiplier + (ulong)carry; 343UInt128 prod1 = (UInt128)(ulong)right[i + 1] * (ulong)multiplier + (ulong)hi0; 350UInt128 prod2 = (UInt128)(ulong)right[i + 2] * (ulong)multiplier + (ulong)hi1; 357UInt128 prod3 = (UInt128)(ulong)right[i + 3] * (ulong)multiplier + (ulong)hi2; 369UInt128 product = (UInt128)(ulong)right[i] * (ulong)multiplier + (ulong)carry; 382ulong product = (ulong)right[i] * multiplier + carry;
System.Security.Cryptography (37)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.manual.cs (1)
42Rc2CbcEncoding.Rc2EkbEncoding[keySize];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (2)
69if (integer[newStart] >= 0x80) 75if (integer[newStart] != 0)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
244int tmp = carry + into[i] + addend[i];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (3)
220int local = CheckZero(source[i]); 498if (em[em.Length - 1] != 0xBC) 644a[i] ^= b[i];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519WindowsHelpers.cs (5)
193if (key[i] > FieldPrime[i]) 195if (key[i] < FieldPrime[i]) 213int diff = key[i] - FieldPrime[i] - borrow;
System\Security\Cryptography\CryptographicOperations.cs (3)
54accum |= left[i] - right[i]; 92accum |= source[i] - value;
System\Security\Cryptography\Helpers.cs (2)
102if (char.IsWhiteSpace(s[i])) 114char c = s[i];
System\Security\Cryptography\PemEncoding.cs (5)
153if (preebIndex > 0 && !IsWhiteSpaceCharacter(pemData[preebIndex - 1], T.Whitespace)) 199!IsWhiteSpaceCharacter(pemData[pemEndIndex], T.Whitespace)) 269TChar c = data[index]; 310for (; start < str.Length && IsWhiteSpaceCharacter(str[start], T.Whitespace); start++); 311for (; end > start && IsWhiteSpaceCharacter(str[end], T.Whitespace); end--);
System\Security\Cryptography\RandomNumberGenerator.cs (3)
382destination[i] = choices[randomBytes[i] & mask]; 419destination[i++] = choices[masked]; 433destination[i] = choices[GetInt32(choices.Length)];
System\Security\Cryptography\SymmetricPadding.cs (1)
196if (block[i] != padBytes)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (2)
1122while (leadingZeros < serialNumber.Length - 1 && serialNumber[leadingZeros] == 0 && serialNumber[leadingZeros + 1] < 0x80)
System.Security.Cryptography.Pkcs (14)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.manual.cs (1)
42Rc2CbcEncoding.Rc2EkbEncoding[keySize];
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
244int tmp = carry + into[i] + addend[i];
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (2)
281while (slice < nonceSpan.Length && nonceSpan[slice] == 0) 287if (slice == nonceSpan.Length || nonceSpan[slice] >= 0x80)
System\Security\Cryptography\Pkcs\SubjectIdentifier.cs (1)
63if (serial[i] != 0)
System.Security.Cryptography.ProtectedData (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
System.Security.Cryptography.Xml (8)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System.Security.Principal.Windows (2)
_generated\0\LibraryImports.g.cs (2)
434__names_native__nativeSpan[__i0] = global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.ConvertToUnmanaged(__names_native__managedSpan[__i0]); 473global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Free(__names_native__nativeSpan[__i0]);
System.Text.Encoding.CodePages (23)
System\Text\EncodingTable.cs (15)
29item = (MappedFamilyCodePage[i], MappedFlags[i]); 66Debug.Assert(encodingNameIndices[encodingNameIndices.Length - 1] == EncodingNames.Length); 77result = CompareOrdinal(name, EncodingNames, encodingNameIndices[index], encodingNameIndices[index + 1] - encodingNameIndices[index]); 81return CodePagesByName[index]; 99if (CompareOrdinal(name, EncodingNames, encodingNameIndices[left], encodingNameIndices[left + 1] - encodingNameIndices[left]) == 0) 101return CodePagesByName[left]; 138Debug.Assert(indices[indices.Length - 1] == names.Length); 158string name = names.Substring(indices[i], indices[i + 1] - indices[i]);
System\Text\ISCIIEncoding.cs (6)
206int indicInfo = UnicodeToIndicChar[ch - IndicBegin]; 258if (!buffer.AddByte(SecondIndicByte[indicTwoBytes >> 12])) 357currentCodePageIndex = IndicMappingIndex[currentCodePage]; 384currentCodePageIndex = IndicMappingIndex[currentCodePage]; 398currentCodePageIndex = IndicMappingIndex[currentCodePage]; 413currentCodePageIndex = IndicMappingIndex[currentCodePage];
System\Text\ISO2022Encoding.cs (2)
59internal ISO2022Encoding(int codePage) : base(codePage, TableBaseCodePages[codePage % 10]) 410iBytes = unchecked((ushort)(HalfToFullWidthKanaTable[bTrailByte - 0x21] & 0x7F7F));
System.Text.Encodings.Web (13)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (5)
147char thisChar = source[srcIdx]; 192if (Rune.TryCreate(thisChar, source[srcIdxTemp], out scalarValue)) 266uint thisByte = source[srcIdx]; 368if ((uint)asciiBytesSkipped >= (uint)data.Length || UnicodeUtility.IsAsciiCodePoint(data[asciiBytesSkipped])) 408if ((uint)idx >= (uint)data.Length || char.IsAscii(data[idx]))
System.Text.Json (164)
_generated\0\RegexGenerator.g.cs (3)
119while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration])) 159while ((uint)iteration2 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration2])) 185if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
58char current = chars[i]; 90if (i + 1 < chars.Length && char.IsLower(chars[i + 1]))
System\Text\Json\JsonHelpers.cs (2)
396if (span[i] == '.') 414Debug.Assert(span[i] is (byte)'e' or (byte)'E');
System\Text\Json\JsonHelpers.Date.cs (3)
310while (sourceIndex < fractionEnd && IsDigit(curByte = source[sourceIndex])) 338curByte = source[sourceIndex++]; 559int totalDays = (yearMinusOne * 365) + (yearMinusOne / 4) - (yearMinusOne / 100) + (yearMinusOne / 400) + days[parseData.Month - 1] + parseData.Day - 1;
System\Text\Json\Reader\JsonReaderHelper.cs (2)
50char c = span[i]; 86char c = span[i];
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (14)
370Debug.Assert(source[idx] == JsonConstants.BackSlash); 394Debug.Assert(source[idx] == JsonConstants.BackSlash); 406Debug.Assert(source[idx] == JsonConstants.BackSlash); 440Debug.Assert(source[idx] == 'u', "invalid escape sequences must have already been caught by Utf8JsonReader.Read()"); 462if (source.Length < idx + 7 || source[idx + 1] != '\\' || source[idx + 2] != 'u') 504if (source[idx] != JsonConstants.BackSlash) 522destination[written++] = source[idx++]; 525destination[written++] = source[idx++]; 526destination[written++] = source[idx++]; 529destination[written++] = source[idx++]; 530destination[written++] = source[idx++]; 531destination[written++] = source[idx++]; 540Debug.Assert(idx == source.Length || source[idx] == JsonConstants.BackSlash);
System\Text\Json\Reader\Utf8JsonReader.cs (48)
826byte first = _buffer[_consumed]; 839first = _buffer[_consumed]; 1128marker = _buffer[_consumed]; 1138marker = _buffer[_consumed]; 1186if (span[i] != literal[i]) 1248ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 1257JsonConstants.Delimiters.Contains(_buffer[_consumed])) 1277byte first = _buffer[_consumed]; 1289first = _buffer[_consumed]; 1307Debug.Assert(_buffer[_consumed] == JsonConstants.Quote); 1320byte foundByte = localBuffer[idx]; 1352Debug.Assert(data[idx] != JsonConstants.Quote); 1353Debug.Assert(data[idx] == JsonConstants.BackSlash || data[idx] < JsonConstants.Space); 1363byte currentByte = data[idx]; 1434byte nextByte = data[j]; 1466byte nextByte = data[i]; 1482nextByte = data[i]; 1498nextByte = data[i]; 1522nextByte = data[i]; 1555ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1565byte nextByte = data[i]; 1580nextByte = data[i]; 1592Debug.Assert(data[i] == (byte)'0'); 1597nextByte = data[i]; 1617nextByte = data[i]; 1634nextByte = data[i]; 1673byte nextByte = data[i]; 1696byte nextByte = data[i]; 1709nextByte = data[i]; 1795byte first = _buffer[_consumed]; 1806first = _buffer[_consumed]; 1884byte first = _buffer[_consumed]; 1894first = _buffer[_consumed]; 1932first = _buffer[_consumed]; 1943first = _buffer[_consumed]; 2119marker = _buffer[_consumed]; 2129marker = _buffer[_consumed]; 2155marker = _buffer[_consumed]; 2166marker = _buffer[_consumed]; 2264marker = _buffer[_consumed]; 2275marker = _buffer[_consumed]; 2375if (localBuffer[idx] == JsonConstants.LineFeed) 2381Debug.Assert(localBuffer[idx] == JsonConstants.CarriageReturn); 2385if (localBuffer[idx + 1] == JsonConstants.LineFeed) 2441if (localBuffer[idx] != JsonConstants.StartingByteOfNonStandardSeparator) 2486if (foundIdx != 0 && localBuffer[foundIdx + idx - 1] == JsonConstants.Asterisk)
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (51)
133byte first = _buffer[_consumed]; 146first = _buffer[_consumed]; 478marker = _buffer[_consumed]; 489marker = _buffer[_consumed]; 695ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 704JsonConstants.Delimiters.Contains(_buffer[_consumed])) 724byte first = _buffer[_consumed]; 736first = _buffer[_consumed]; 754Debug.Assert(_buffer[_consumed] == JsonConstants.Quote); 767byte foundByte = localBuffer[idx]; 822byte foundByte = localBuffer[idx]; 843byte currentByte = localBuffer[idx]; 876byte nextByte = localBuffer[j]; 963Debug.Assert(data[idx] != JsonConstants.Quote); 964Debug.Assert(data[idx] == JsonConstants.BackSlash || data[idx] < JsonConstants.Space); 980byte currentByte = data[idx]; 1013byte nextByte = data[j]; 1143byte nextByte = data[i]; 1160nextByte = data[i]; 1176nextByte = data[i]; 1202nextByte = data[i]; 1239ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1260byte nextByte = data[i]; 1289nextByte = data[i]; 1301Debug.Assert(data[i] == (byte)'0'); 1308nextByte = data[i]; 1337nextByte = data[i]; 1343nextByte = data[i]; 1361nextByte = data[i]; 1399nextByte = data[i]; 1456byte nextByte = data[i]; 1492byte nextByte = data[i]; 1519nextByte = data[i]; 1618byte first = _buffer[_consumed]; 1629first = _buffer[_consumed]; 1707byte first = _buffer[_consumed]; 1717first = _buffer[_consumed]; 1764first = _buffer[_consumed]; 1775first = _buffer[_consumed]; 1953marker = _buffer[_consumed]; 1963marker = _buffer[_consumed]; 1989marker = _buffer[_consumed]; 2000marker = _buffer[_consumed]; 2111marker = _buffer[_consumed]; 2122marker = _buffer[_consumed]; 2351if (localBuffer[idx] == JsonConstants.LineFeed) 2357Debug.Assert(localBuffer[idx] == JsonConstants.CarriageReturn); 2361if (localBuffer[idx + 1] == JsonConstants.LineFeed) 2443if (localBuffer[idx] != JsonConstants.StartingByteOfNonStandardSeparator) 2551byte marker = localBuffer[idx];
System\Text\Json\Schema\JsonSchemaExporter.cs (2)
571if (span[pos] == '~') 577Debug.Assert(span[pos] == '/');
System\Text\Json\Serialization\Converters\Collection\ReadOnlyMemoryConverter.cs (2)
63elementConverter.Write(writer, value[index], options); 70if (!elementConverter.TryWrite(writer, value[index], options, ref state))
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (1)
395JsonPropertyInfo jsonPropertyInfo = propertyCache[state.Current.EnumeratorIndex];
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (1)
56if (!JsonHelpers.IsDigit(firstChar) || firstSeparator < 0 || source[firstSeparator] == (byte)'.')
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (3)
104propertyRef = utf8PropertyCacheSpan[iForward]; 115propertyRef = utf8PropertyCacheSpan[iBackward]; 127propertyRef = utf8PropertyCacheSpan[iBackward];
System\Text\Json\Serialization\PipeReadBufferState.cs (2)
122if (span[i] != JsonConstants.Utf8Bom[matched])
System\Text\Json\ThrowHelper.cs (1)
538byte nextByte = value[i];
System\Text\Json\Writer\JsonWriterHelper.cs (9)
162if (utf8FormattedNumber[i] == '-') 172if (utf8FormattedNumber[i] == '0') 178while (i < utf8FormattedNumber.Length && JsonHelpers.IsDigit(utf8FormattedNumber[i])) 190byte val = utf8FormattedNumber[i]; 201while (i < utf8FormattedNumber.Length && JsonHelpers.IsDigit(utf8FormattedNumber[i])) 212val = utf8FormattedNumber[i]; 224val = utf8FormattedNumber[i]; 243while (i < utf8FormattedNumber.Length && JsonHelpers.IsDigit(utf8FormattedNumber[i])) 251SR.Format(SR.ExpectedEndOfDigitNotFound, ThrowHelper.GetPrintableString(utf8FormattedNumber[i])),
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (6)
52bool needsEscaping = AllowList[i] == 0; 66private static bool NeedsEscaping(byte value) => AllowList[value] == 0; 68private static bool NeedsEscapingNoBoundsCheck(char value) => AllowList[value] == 0; 169byte val = value[indexOfFirstByteToEscape]; 261ThrowHelper.ThrowArgumentException_InvalidUTF16(value[encoderCharsWritten]); 293char val = value[indexOfFirstByteToEscape];
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (2)
100ThrowHelper.ThrowArgumentException_InvalidUTF16(value[written]); 141ThrowHelper.ThrowArgumentException_InvalidUTF16(value[written]);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (2)
549dest[total++] = srcLeft[i]; 560dest[total++] = srcRight[i];
System.Text.Json.SourceGeneration (3)
src\runtime\src\libraries\Common\src\SourceGenerators\SourceWriter.cs (1)
103if ((uint)lineLength > 0 && remainingText[lineLength - 1] == '\r')
src\runtime\src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
58char current = chars[i]; 90if (i + 1 < chars.Length && char.IsLower(chars[i + 1]))
System.Text.RegularExpressions (62)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Text\RegularExpressions\RegexCaseEquivalences.cs (2)
135ushort firstLevelLookupValue = EquivalenceFirstLevelLookup[index]; 147ushort mappingValue = EquivalenceCasingMap[index2];
System\Text\RegularExpressions\RegexCharClass.cs (14)
289rangeList.Add((set[i], (char)(set[i + 1] - 1))); 294rangeList.Add((set[i], LastChar)); 1192(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1211(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1370int curcat = (short)categorySetSegment[i]; 1423int curcat = (short)category[pos]; 1501int setLength = set[SetLengthIndex]; 1511char first = set[i]; 1514char last = i < end ? (char)(set[i] - 1) : LastChar; 1541Debug.Assert(chars[index] < chars[index + 1]); 1577if (chars[chars.Length - 1] == LastChar) 1985invertedGroup[i] = (char)-(short)group[i];
System\Text\RegularExpressions\RegexFindOptimizations.cs (9)
439if (pos < textSpan.Length - 1 || ((uint)pos < (uint)textSpan.Length && textSpan[pos] != '\n')) 498if (RegexCharClass.CharInClass(span[i], set, ref startingAsciiLookup)) 541if ((uint)posm1 < (uint)textSpan.Length && textSpan[posm1] != '\n') 677if (RegexCharClass.CharInClass(span[i], primarySet.Set, ref startingAsciiLookup)) 770char c = textSpan[inputPosition + nextSet.Distance]; 789char c = textSpan[inputPosition + primarySet.Distance]; 798c = textSpan[inputPosition + nextSet.Distance]; 841while ((uint)--prev < (uint)slice.Length && RegexCharClass.CharInClass(slice[prev], loopNode.Str!, ref _asciiLookups![0])) ; 903totalFrequency += frequency[c];
System\Text\RegularExpressions\RegexInterpreter.cs (5)
207return inputSpan[i]; 302!equivalences.Contains(inputSpan[pos])) 742if ((uint)m1 < (uint)inputSpan.Length && inputSpan[m1] != '\n') 753if ((uint)runtextpos < (uint)inputSpan.Length && inputSpan[runtextpos] != '\n') 812if (runtextpos < inputSpan.Length - 1 || ((uint)runtextpos < (uint)inputSpan.Length && inputSpan[runtextpos] != '\n'))
System\Text\RegularExpressions\RegexNode.cs (1)
1453while (c < minLength && startingSpan[c] == startingNode.Str[c]) c++;
System\Text\RegularExpressions\RegexParser.cs (5)
2139private static bool IsSpecial(char ch) => ch <= '|' && Category[ch] >= S; 2142private static bool IsSpecialOrSpace(char ch) => ch <= '|' && Category[ch] >= W; 2145private static bool IsQuantifier(char ch) => ch <= '{' && Category[ch] == Q; 2148private static bool IsSpace(char ch) => ch <= ' ' && Category[ch] == W; 2158return ch <= '{' && Category[ch] >= Q;
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
846sum += Frequency[c];
System\Text\RegularExpressions\RegexReplacement.cs (2)
283(int offset, int count) = (span[i], span[i + 1]);
System\Text\RegularExpressions\RegexRunner.cs (6)
420return ((uint)indexM1 < (uint)inputSpan.Length && RegexCharClass.IsBoundaryWordChar(inputSpan[indexM1])) != 421((uint)index < (uint)inputSpan.Length && RegexCharClass.IsBoundaryWordChar(inputSpan[index])); 430return (uint)indexMinus1 >= (uint)inputSpan.Length || !RegexCharClass.IsBoundaryWordChar(inputSpan[indexMinus1]); 437(uint)index >= (uint)inputSpan.Length || !RegexCharClass.IsBoundaryWordChar(inputSpan[index]); 452return ((uint)indexM1 < (uint)inputSpan.Length && RegexCharClass.IsECMAWordChar(inputSpan[indexM1])) != 453((uint)index < (uint)inputSpan.Length && RegexCharClass.IsECMAWordChar(inputSpan[index]));
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (2)
161result = Or(result, sets[i]); 180result = And(result, sets[i]);
System\Text\RegularExpressions\Symbolic\MintermClassifier.cs (1)
86foreach ((uint start, uint end) in ((uint, uint)[])charRangesPerMinterm[mintermId])
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (4)
678char c = input[pos]; 1487int c = input[pos]; 1503matcher._mintermClassifier.GetMintermID(input[pos]) : 1586currentStateId = matcher._dotstarredInitialStates[matcher._positionKinds[GetMintermId(lookup, input[pos - 1]) + 1]].Id;
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (2)
156int targetId = deltas[i]; 167if (nfaDeltas.Length > 0 && nfaDeltas[i] is int[] nfaTargets)
System.Text.RegularExpressions.Generator (38)
RegexGenerator.Emitter.cs (1)
5740(description = categoryDescriptions[cat]) is not null)
src\runtime\src\libraries\Common\src\System\Buffers\SearchValuesPolyfills.cs (2)
102if (Contains(span[i])) 115if (!Contains(span[i]))
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
src\runtime\src\libraries\Common\src\System\MemoryExtensionsPolyfills.cs (1)
16if (span[i] != value)
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCaseEquivalences.cs (2)
135ushort firstLevelLookupValue = EquivalenceFirstLevelLookup[index]; 147ushort mappingValue = EquivalenceCasingMap[index2];
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (14)
289rangeList.Add((set[i], (char)(set[i + 1] - 1))); 294rangeList.Add((set[i], LastChar)); 1192(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1211(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1370int curcat = (short)categorySetSegment[i]; 1423int curcat = (short)category[pos]; 1501int setLength = set[SetLengthIndex]; 1511char first = set[i]; 1514char last = i < end ? (char)(set[i] - 1) : LastChar; 1541Debug.Assert(chars[index] < chars[index + 1]); 1577if (chars[chars.Length - 1] == LastChar) 1985invertedGroup[i] = (char)-(short)group[i];
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
903totalFrequency += frequency[c];
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (1)
1453while (c < minLength && startingSpan[c] == startingNode.Str[c]) c++;
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (5)
2139private static bool IsSpecial(char ch) => ch <= '|' && Category[ch] >= S; 2142private static bool IsSpecialOrSpace(char ch) => ch <= '|' && Category[ch] >= W; 2145private static bool IsQuantifier(char ch) => ch <= '{' && Category[ch] == Q; 2148private static bool IsSpace(char ch) => ch <= ' ' && Category[ch] == W; 2158return ch <= '{' && Category[ch] >= Q;
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
846sum += Frequency[c];
Stubs.cs (2)
52if (span[i] != other[i])
System.Threading.AccessControl (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
81while (length > 0 && buffer[length - 1] <= 32)
System.Web.HttpUtility (21)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (8)
200ToBytesBuffer(source[pos], utf8Destination, pos * 2, casing); 217ToCharsBuffer(source[pos], destination, pos * 2, casing); 468byteLo = FromChar(utf8Source[i + 1]); 469byteHi = FromChar(utf8Source[i]); 503byteLo = FromChar(source[i + 1]); 504byteHi = FromChar(source[i]); 529return (c >= CharToHexLookup.Length) ? 0xFF : CharToHexLookup[c]; 535return (c > 71) ? 0xFF : CharToHexLookup[c];
System\Web\Util\HttpEncoder.cs (13)
78char ch = remaining[i]; 152char c = chars[i]; 216byte b = bytes[i]; 224int h1 = HexConverter.FromChar(bytes[i + 1]); 225int h2 = HexConverter.FromChar(bytes[i + 2]); 335char ch = value[pos]; 343if (value[pos + 1] == 'u' && pos < count - 5) 345int h1 = HexConverter.FromChar(value[pos + 2]); 346int h2 = HexConverter.FromChar(value[pos + 3]); 347int h3 = HexConverter.FromChar(value[pos + 4]); 348int h4 = HexConverter.FromChar(value[pos + 5]); 362int h1 = HexConverter.FromChar(value[pos + 1]); 363int h2 = HexConverter.FromChar(value[pos + 2]);
System.Windows.Forms (3)
_generated\2\RegexGenerator.g.cs (1)
116while ((uint)iteration < (uint)slice.Length && !char.IsWhiteSpace(slice[iteration]))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs (1)
147object? obj = objects[i];
System\Windows\Forms\Rendering\ControlPaint.cs (1)
305ARGB color = colors[y * width + x];
System.Windows.Forms.Design (5)
System\ComponentModel\Design\ByteViewer.cs (2)
189char c = Convert.ToChar(lineBuffer[i]); 211lineBuffer[i].TryFormat(charsBuffer.Slice(charsWritten, 2), out _, "X2");
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (3)
1307if (leftType == compatibleTypes[i]) 1312if (rightType == compatibleTypes[i]) 1331switch (compatibleTypes[maxIndex])
System.Windows.Forms.Primitives (8)
System\Windows\Forms\DeviceContextExtensions.cs (4)
92PInvoke.MoveToEx(hdc, lines[i], lines[i + 1], &oldPoint); 93PInvoke.LineTo(hdc, lines[i + 2], lines[i + 3]);
System\Windows\Forms\SystemDrawingExtensions.cs (4)
60graphics.DrawLine(pen, lines[i], lines[i + 1], lines[i + 2], lines[i + 3]);
System.Xaml (2)
System\Xaml\Parser\GenericTypeNameScanner.cs (2)
108switch (subscript[pos]) 136if (!IsWhitespaceChar(subscript[pos]))