4 writes to
Microsoft.NET.StringTools (2)
InternableString.cs (2)
52return ref _string._inlineSpan[_charIndex]; 55return ref span.Span[_charIndex];
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (1)
929fixed (uint* pBigNumEntry = &Pow10BigNumTable[Pow10BigNumTableIndices[(int)index]])
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
268get => ref _span[_index];
3791 references to
Aspire.Dashboard (7)
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')
Extensions\StringExtensions.cs (1)
59return $"{char.ToUpperInvariant(s[0])}{char.ToUpperInvariant(s[lastSpaceIndex + 1])}";
Otlp\Model\OtlpHelpers.cs (1)
83ToCharsBuffer(data[pos], chars, pos * 2);
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] == '-')
BuildActionTelemetryTable (3)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
GenerateDocumentationAndConfigFiles (14)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
http2cat (14)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
IIS.FunctionalTests (14)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
IIS.LongTests (14)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
IIS.NewHandler.FunctionalTests (14)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
IIS.NewShim.FunctionalTests (14)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
IIS.ShadowCopy.Tests (3)
src\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
IISExpress.FunctionalTests (14)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
illink (1)
Metrics (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Metrics.Legacy (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.AspNetCore.Authorization (1)
src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
Microsoft.AspNetCore.Components (4)
src\Http\Routing\src\Constraints\FileNameRouteConstraint.cs (1)
145if (value[i] != '.')
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.Server (3)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
42byteRead = span[numBytes];
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)
201if (hrefAbsolute[hrefAbsolute.Length - 1] == '/' &&
Microsoft.AspNetCore.Cors (1)
src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Latency\AcceptanceTests.cs (1)
88if (isMatch(span[i]))
Microsoft.AspNetCore.Http.Abstractions (4)
src\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
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\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
83if (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.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Base32.cs (1)
90var byteIndex = _base32Chars.IndexOf(char.ToUpperInvariant(trimmedInput[inputIndex]));
Microsoft.AspNetCore.Mvc.Core (2)
Routing\UrlHelperBase.cs (1)
365if (char.IsControl(readOnlySpan[i]))
src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
83if (char.IsControl(readOnlySpan[i]))
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
280var tag = tags.Span[i];
Microsoft.AspNetCore.Routing (6)
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\Shared\Debugger\DebuggerHelpers.cs (1)
44var kvp = values[i];
Microsoft.AspNetCore.Server.HttpSys (7)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
197if (index < timestamps.Length && timestamps[index] > 0) 199timestamp = timestamps[index];
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
283var header = HeaderKeys[i]; 297var header = HeaderKeys[i];
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (2)
268if (buffer[scan++] != '%') 313var value = buffer[scan++];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (13)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
Microsoft.AspNetCore.Server.IIS (7)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
197if (index < timestamps.Length && timestamps[index] > 0) 199timestamp = timestamps[index];
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
283var header = HeaderKeys[i]; 297var header = HeaderKeys[i];
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (2)
268if (buffer[scan++] != '%') 313var value = buffer[scan++];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
Microsoft.AspNetCore.Server.Kestrel.Core (57)
Internal\Http\HttpHeaders.cs (4)
362c = value[offset]; 442c = value[offset]; 549c = values[offset]; 603c = values[offset];
Internal\Http\HttpParser.cs (17)
104var ch = requestLine[offset]; 121if (requestLine[offset + index] == BytePercentage) 130ch = requestLine[offset]; 141ch = requestLine[offset]; 154&& requestLine[offset] == ByteSpace) 163if ((uint)offset + 9 != (uint)requestLine.Length || requestLine[offset + 8] != ByteCR) 216if (span[lfOrCrIndex] == ByteCR) 224if ((uint)span.Length > (uint)(crIndex + 1) && span[crIndex + 1] == ByteLF) 381if (memory.Span[index] == ByteCR) 399if (memory.Span[index] == ByteCR) 477var expectedColon = headerLine[nameEnd]; 495var ch = headerLine[valueStart]; 504ch = headerLine[valueStart]; 512ch = headerLine[valueStart]; 529var ch = headerLine[valueEnd]; 537ch = headerLine[valueEnd]; 559if (invalidIndex <= 0 || span[invalidIndex] != ByteSpace)
Internal\Http2\Http2Connection.cs (2)
641if (requestLine.Length > 10 && requestLine[requestLine.Length - 1] == (byte)'\r') 1672if (((uint)name[i] - 65) <= (90 - 65))
Internal\Http2\Http2Stream.cs (1)
444var ch = pathSegment[i];
Internal\Http3\Http3Stream.cs (2)
382if (((uint)name[i] - 65) <= (90 - 65)) 1206var 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\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\runtime\Http3\QPack\QPackDecoder.cs (5)
344byte b = data[currentIndex++]; 430byte b = data[currentIndex++]; 536byte b = data[currentIndex++]; 565byte b = data[currentIndex++]; 691if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http3\QPack\QPackEncoder.cs (2)
271value = values[i]; 286written = valueEncoding.GetBytes(values[i], buffer);
src\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
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\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
Microsoft.AspNetCore.Shared.Tests (32)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
197if (index < timestamps.Length && timestamps[index] > 0) 199timestamp = timestamps[index];
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
283var header = HeaderKeys[i]; 297var header = HeaderKeys[i];
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (2)
268if (buffer[scan++] != '%') 313var value = buffer[scan++];
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (4)
217byte b = data[currentIndex++]; 289byte b = data[currentIndex++]; 317byte b = data[currentIndex++]; 642if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
566value = values[i]; 581written = valueEncoding.GetBytes(values[i], destination);
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\Shared\runtime\Http3\QPack\QPackDecoder.cs (5)
344byte b = data[currentIndex++]; 430byte b = data[currentIndex++]; 536byte b = data[currentIndex++]; 565byte b = data[currentIndex++]; 691if (_integerDecoder.TryDecode(data[currentIndex], out result))
src\Shared\runtime\Http3\QPack\QPackEncoder.cs (2)
271value = values[i]; 286written = valueEncoding.GetBytes(values[i], buffer);
src\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
65frame.Type = (Http2FrameType)header[TypeOffset]; 66frame.Flags = header[FlagsOffset];
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
189buffer[7] = (char)hexEncodeMap[number & 0xF];
src\Shared\UrlDecoder\UrlDecoder.cs (3)
558if (buffer[tempIdx] != '%') 595int value = buffer[tempIdx]; 603return (uint)c >= (uint)CharToHexLookup.Length ? -1 : CharToHexLookup[c];
src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.AspNetCore.SignalR.Common.Tests (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
42byteRead = span[numBytes];
Microsoft.AspNetCore.SignalR.Microbenchmarks (2)
src\SignalR\common\Http.Connections\src\ServerSentEventsMessageFormatter.cs (1)
88if (memory.Span[memory.Length - 1] == '\r')
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
42byteRead = span[numBytes];
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
42byteRead = span[numBytes];
Microsoft.AspNetCore.WebUtilities (6)
MultipartReaderStream.cs (1)
345if (matchBytes[matchCount] != segment1.Array![matchOffset + matchCount])
src\Shared\UrlDecoder\UrlDecoder.cs (3)
558if (buffer[tempIdx] != '%') 595int value = buffer[tempIdx]; 603return (uint)c >= (uint)CharToHexLookup.Length ? -1 : CharToHexLookup[c];
src\Shared\WebEncoders\WebEncoders.cs (2)
81if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_') 138if (indexOfFirstDifferentiator < 0 || inputSpan[indexOfFirstDifferentiator] is '-' or '_')
Microsoft.Build.Tasks.CodeAnalysis (7)
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.CodeAnalysis.Sdk (7)
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.CodeAnalysis (41)
CaseInsensitiveComparison.cs (4)
130int ordDiff = CompareLowerUnicode(str1[i], str2[i]); 183if (!AreEqualLowerUnicode(str1[i], str2[i]))
CommandLine\CommandLineParser.cs (8)
109char ch = value[i]; 958var cur = arg[i]; 984while (i < arg.Length && arg[i] == '\\') 990if (i < arg.Length && arg[i] == '"') 1035while (end > 0 && span[end - 1] == '"') 1040while (start < end && span[start] == '"') 1047if (span[i] == '"') 1092var c = span[i];
FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.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)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = 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)
507if (emittedTypeName[indexOfManglingChar - 1] == GenericTypeNameManglingChar) 641if (nameSpan[i] == DotDelimiter)
PEWriter\InstructionOperandTypes.cs (2)
18return (OperandType)TwoByte[il[position++]]; 22return (OperandType)OneByte[operation];
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 (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.AnalyzerUtilities (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.BannedApiAnalyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
68Debug.Assert(customTags[i] == tags[i]);
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
361_formatArguments[i] = $"{formatArguments[i]}";
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.Collections.Package (1)
Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
Microsoft.CodeAnalysis.CSharp (14)
CommandLine\CSharpCommandLineParser.cs (2)
1769if (valueSpan[index] is ';' or ',') 1922if (eqlOrQuote >= 0 && valueSpan[eqlOrQuote] == '=')
Lowering\ExtensionMethodBodyRewriter.cs (1)
66builder.Add(parameter, rewrittenParameters[parameter.Ordinal]);
Parser\LanguageParser_InterpolatedString.cs (7)
147Debug.Assert(closeQuoteText[afterWhitespace] == '"'); 195var isBlankLine = (currentIndex == text.Length && isLast) || (currentIndex < text.Length && SyntaxFacts.IsNewLine(text[currentIndex])); 301var currentLineChar = currentLineWhitespace[i]; 302var indentationLineChar = indentationLineWhitespace[i]; 326while (currentIndex < text.Length && SyntaxFacts.IsWhitespace(text[currentIndex])) 336var ch = text[currentIndex]; 343currentIndex += SlidingTextWindow.GetNewLineWidth(ch, currentIndex + 1 < text.Length ? text[currentIndex + 1] : '\0');
Parser\QuickScanner.cs (1)
211var flags = uc < charPropLength ? (CharFlags)CharProperties[uc] : CharFlags.Complex;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
566ParamInfo<TypeSymbol> param = parameterTypes[i];
Symbols\MemberSignatureComparer.cs (2)
774if (!HaveSameParameterType(params1[i], typeMap1, params2[i], typeMap2, refKindCompareMode, considerDefaultValues, typeComparison))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
304var name = IdentifierName(names[i]);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
327conj = $"(?({regexes[i]}){conj}|[0-[0]])";
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
304var name = IdentifierName(names[i]);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EmbeddedLanguages\StackFrame\StackFrameSyntaxFactory.cs (1)
83builder.Add(parameters[i]);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\Compilers\Core\Portable\CaseInsensitiveComparison.cs (4)
130int ordDiff = CompareLowerUnicode(str1[i], str2[i]); 183if (!AreEqualLowerUnicode(str1[i], str2[i]))
Microsoft.CodeAnalysis.Extensions.Package (4)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
Microsoft.CodeAnalysis.Features (5)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (2)
104operations[current] is IConditionalOperation { WhenFalse: null } op && 133var nextStatement = operations[current];
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (1)
209return (asciiLookup[chDiv8] & (1 << (ch & 0x7))) != 0;
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
68Debug.Assert(customTags[i] == tags[i]);
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
361_formatArguments[i] = $"{formatArguments[i]}";
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\SourceMarkers.cs (2)
179if (span[i] != c) 192if (span[i] != c)
Microsoft.CodeAnalysis.InteractiveHost (7)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.PublicApiAnalyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.ResxSourceGenerator (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.Test.Utilities (4)
Assert\AssertEx.cs (4)
373if (!(comparer is not null ? comparer.Equals(expected[i], actual[i]) : AssertEqualityComparer<T>.Equals(expected[i], actual[i])))
Microsoft.CodeAnalysis.Threading.Package (1)
src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
Microsoft.CodeAnalysis.Workspaces (16)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
137if (docCommentId.Span[expectedDocCommentId.Length] != '.')
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (1)
179var node = sortedNodes.Span[i];
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (20)
src\Compilers\Core\Portable\CaseInsensitiveComparison.cs (4)
130int ordDiff = CompareLowerUnicode(str1[i], str2[i]); 183if (!AreEqualLowerUnicode(str1[i], str2[i]))
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
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] != '"')
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
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)
500long mapRowIndex = mapIndicesIntSpan.IsEmpty ? mapIndicesLongSpan[spanIndex] : mapIndicesIntSpan[spanIndex]; 577newBuffer.Append(ByteConverter<T>.Instance.GetByte(span[i])); 596newBuffer.Append(SByteConverter<T>.Instance.GetSByte(span[i])); 615newBuffer.Append(DoubleConverter<T>.Instance.GetDouble(span[i])); 634newBuffer.Append(DecimalConverter<T>.Instance.GetDecimal(span[i])); 653newBuffer.Append(Int16Converter<T>.Instance.GetInt16(span[i])); 672newBuffer.Append(UInt16Converter<T>.Instance.GetUInt16(span[i])); 691newBuffer.Append(Int32Converter<T>.Instance.GetInt32(span[i])); 710newBuffer.Append(UInt32Converter<T>.Instance.GetUInt32(span[i])); 729newBuffer.Append(Int64Converter<T>.Instance.GetInt64(span[i])); 748newBuffer.Append(UInt64Converter<T>.Instance.GetUInt64(span[i])); 767newBuffer.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.DotNet.SwaggerGenerator.CodeGenerator (8)
Helpers.cs (8)
28if (!char.IsLetterOrDigit(value[idx]) || char.IsUpper(value[idx])) 38if (char.IsLetterOrDigit(value[idx])) 71c = char.ToUpperInvariant(word[i]); 75c = char.ToLowerInvariant(word[i]); 101c = char.ToUpperInvariant(word[i]); 105c = char.ToLowerInvariant(word[i]); 131builder.Append(char.ToLowerInvariant(word[i]));
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
760contents.Add(CreateFunctionResultContent(results[i]));
Microsoft.Extensions.AI.Abstractions (5)
Contents\DataUriParser.cs (3)
161if (value[index] == '=') 166if (value[index] == '=') 175bool validChar = value[i] is (>= 'A' and <= 'Z') or (>= 'a' and <= 'z') or (>= '0' and <= '9') or '+' or '/';
Embeddings\BinaryEmbedding.cs (1)
73result[i] = utf8[i] switch
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
563string segment = path[i];
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceEmbeddingGenerator.cs (1)
128if (base64.Length < 2 || base64[0] != (byte)'"' || base64[base64.Length - 1] != (byte)'"')
Microsoft.Extensions.AI.Integration.Tests (1)
QuantizationEmbeddingGenerator.cs (1)
53if (vector[i] > 0)
Microsoft.Extensions.AI.OpenAI (2)
src\Shared\ServerSentEvents\SseFormatter.cs (2)
156if (data[i++] == '\r' && i < data.Length && data[i] == '\n')
Microsoft.Extensions.Caching.Hybrid (2)
Internal\HybridCachePayload.cs (2)
396byteReadJustNow = buffer[index++]; 410byteReadJustNow = buffer[index++];
Microsoft.Extensions.Diagnostics.ResourceMonitoring (8)
Linux\LinuxUtilizationParserCgroupV1.cs (4)
383while (numberStart < buffer.Length && char.IsWhiteSpace(buffer[numberStart])) 388if (numberStart == buffer.Length || !char.IsDigit(buffer[numberStart])) 397while (numberEnd < buffer.Length && char.IsDigit(buffer[numberEnd])) 399int current = buffer[numberEnd] - '0';
Linux\LinuxUtilizationParserCgroupV2.cs (4)
573while (numberStart < buffer.Length && char.IsWhiteSpace(buffer[numberStart])) 578if (numberStart == buffer.Length || !char.IsDigit(buffer[numberStart])) 587while (numberEnd < buffer.Length && char.IsDigit(buffer[numberEnd])) 589int current = buffer[numberEnd] - '0';
Microsoft.Extensions.Http.Diagnostics (6)
Http\DownstreamDependencyMetadataManager.cs (3)
112if (routeSpan.Length > 1 && routeSpan[routeSpan.Length - 1] == '/') 368if (requestRouteAsSpan[requestRouteAsSpan.Length - 1] == '/') 384char ch = _toUpper[requestRouteAsSpan[i]];
Latency\Internal\HttpClientLatencyLogEnricher.cs (3)
72_ = stringBuilder.Append(latencyData.Checkpoints[i].Name); 79var ms = ((double)latencyData.Checkpoints[i].Elapsed / latencyData.Checkpoints[i].Frequency) * 1000;
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)
65nameColumnWidth = Math.Max(nameColumnWidth, latencyData.Checkpoints[i].Name.Length); 71var c = latencyData.Checkpoints[i]; 81nameColumnWidth = Math.Max(nameColumnWidth, latencyData.Tags[i].Name.Length); 87var t = latencyData.Tags[i]; 97nameColumnWidth = Math.Max(nameColumnWidth, latencyData.Measures[i].Name.Length); 103var m = latencyData.Measures[i];
Microsoft.Extensions.Telemetry.Tests (1)
Latency\Internal\TagCollectionTests.cs (1)
106if (tags[i].Value != string.Empty)
Microsoft.Interop.ComInterfaceGenerator (1)
ComInterfaceGenerator.cs (1)
869literals[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 (9)
LightGbmTrainerBase.cs (9)
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 (3)
OlsLinearRegression.cs (3)
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.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 (37)
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 (1)
779var xx = values[i];
Standard\LogisticRegression\LogisticRegression.cs (1)
295if (currentWeightsValues[i] != 0)
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 (3)
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 (48)
Model\BPETokenizer.cs (3)
1049current[i] = (byte)byteToUnicodeEncoding.UnicodeToByte[span[i]]; 1199if (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)' ';
Utils\BytePairEncoder.cs (5)
93int mappedStartIndex = indexMappingSpan[startIndex]; 94int mappedEndIndex = indexMappingSpan[endIndex]; 98if (finalEndIndex > 0 && indexMappingSpan[finalEndIndex - 1] == mappedEndIndex) 102while (finalEndIndex < indexMappingSpan.Length && indexMappingSpan[finalEndIndex] == mappedEndIndex) 108result[i] = (ranks[mergingBytes.SliceStartEnd(startIndex, endIndex)], 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.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)
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];
Roslyn.Diagnostics.Analyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
304var name = IdentifierName(names[i]);
Shared (3)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
563string segment = path[i];
ServerSentEvents\SseFormatter.cs (2)
156if (data[i++] == '\r' && i < data.Length && data[i] == '\n')
System.Collections (2)
System\Collections\Generic\PriorityQueue.cs (2)
894if (EqualityComparer<TElement>.Default.Equals(element, nodes[i].Element)) 904if (equalityComparer.Equals(element, nodes[i].Element))
System.Collections.Immutable (11)
System\Collections\Frozen\FrozenHashTable.cs (4)
184while ((uint)minPrimeIndexInclusive < (uint)primes.Length && minNumBuckets > primes[minPrimeIndexInclusive]) 202while ((uint)maxPrimeIndexExclusive < (uint)primes.Length && maxNumBuckets > primes[maxPrimeIndexExclusive]) 210maxNumBuckets = primes[maxPrimeIndexExclusive - 1]; 225numBuckets = 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.Configuration.ConfigurationManager (6)
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.Data.Common (34)
System\Data\Filter\Operators.cs (1)
142return (uint)op < (uint)priorities.Length ? priorities[op] : PriMax;
System\Data\SQLTypes\SQLDateTime.cs (3)
104if (day >= 1 && day <= days[month] - days[month - 1]) 107int 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]) 1489ulPlier = rglData1[iulPlier]; 1502ulong ulTemp = rglData2[iulCand]; 1820if (rglData[_bLen - 1] == 0) 1827Debug.Assert(rglData[iulData] == 0, "rglData[iulData] == 0", "In AssertValid"); 1914return RgCLenFromPrec[bPrec - 1]; 2314ulShiftBase = RgulShiftBase[lAdjust - 1]; 2443if (rglData1[iData] != rglData2[iData]) 2444return ((rglData1[iData] > rglData2[iData]) ? 1 : -1); 2468rgulD[i] = rgulS[i]; 2490while (ciulU > 1 && rgulU[ciulU - 1] == 0) 3061ulRem = DivByULong(RgulShiftBase[iAdjust - 1]); 3200ulRem = n.DivByULong(RgulShiftBase[lAdjust - 1]); 3201ulLastDivBase = RgulShiftBase[lAdjust - 1];
System\Data\SQLTypes\SQLGuid.cs (2)
132byte b1 = xBytes[rgiGuidOrder[i]]; 133byte b2 = yBytes[rgiGuidOrder[i]];
System.Diagnostics.DiagnosticSource (28)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
System\Diagnostics\Activity.cs (3)
2027outBytes[i] = HexByteFromChars(charData[i * 2], charData[i * 2 + 1]); 2048char c = idData[i];
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)
282if (item.Key == tags[i].Key && item.Value.Equals(tags[i].Value)) 292if (item.Key == tags[i].Key && tags[i].Value is null)
System\Diagnostics\W3CPropagator.cs (10)
269char c = valueSpan[i]; 296if (i + 5 >= valueSpan.Length || valueSpan[i + 3] != Percent || !TryDecodeEscapedByte(valueSpan.Slice(i + 3), out byte b1) || (b1 & 0xC0) != 0x80) 313valueSpan[i + 3] != Percent || 314valueSpan[i + 6] != Percent || 334valueSpan[i + 3] != Percent || 335valueSpan[i + 6] != Percent || 336valueSpan[i + 9] != Percent || 525char c = value[i]; 549if (i < value.Length - 1 && char.IsSurrogatePair((char)c, value[i + 1])) 552uint v = (uint)char.ConvertToUtf32((char)c, value[i + 1]);
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)
263char c = chars[i]; 291byte b = bytes[i]; 332char 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)
130var 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 (12)
src\libraries\Common\src\System\IO\PathInternal.cs (9)
131if (IsDirectorySeparator(path[skip - 1])) 144char c = path[i]; 150if (IsDirectorySeparator(path[i + 1])) 157if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 158path[i + 1] == '.') 167(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 168path[i + 1] == '.' && path[i + 2] == '.') 209sb.Append(path[rootLength - 1]);
System\Formats\Tar\TarHeader.Read.cs (1)
390typeFlag: (TarEntryType)buffer[FieldLocations.TypeFlag])
System\Formats\Tar\TarHelpers.cs (2)
282while (trimmedLength > 0 && buffer[trimmedLength - 1] is 0 or 32) 293while (newStart < buffer.Length && buffer[newStart] is 0 or 32)
System.IO.FileSystem.Watcher (9)
src\libraries\Common\src\System\IO\PathInternal.cs (9)
131if (IsDirectorySeparator(path[skip - 1])) 144char c = path[i]; 150if (IsDirectorySeparator(path[i + 1])) 157if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 158path[i + 1] == '.') 167(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 168path[i + 1] == '.' && path[i + 2] == '.') 209sb.Append(path[rootLength - 1]);
System.IO.Hashing (7)
System\IO\Hashing\Crc32.Arm.cs (2)
35crc = ArmCrc.ComputeCrc32(crc, source[i]); 63crc = ArmCrc.ComputeCrc32(crc, source[i]);
System\IO\Hashing\Crc32.cs (2)
209idx ^= source[i]; 210crc = crcLookup[idx] ^ (crc >> 8);
System\IO\Hashing\Crc64.cs (1)
193idx ^= 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\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 (23)
System\Linq\Aggregate.cs (1)
33result = func(result, span[i]);
System\Linq\Average.cs (1)
48sum += span[i];
System\Linq\Max.cs (6)
113for (i = 0; i < span.Length && T.IsNaN(span[i]); i++) ; 120for (value = span[i]; (uint)i < (uint)span.Length; i++) 122if (span[i] > value) 124value = span[i]; 235if (span[i] > value) 237value = span[i];
System\Linq\MaxMin.cs (2)
45if (TMinMax.Compare(span[i], value)) 47value = span[i];
System\Linq\Min.cs (3)
97T current = span[i]; 215if (span[i] < value) 217value = 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.IndexOf(CurrentSpan[i]) != -1; i++) 647T value = CurrentSpan[i]; 684T value = CurrentSpan[i]; 721T value = CurrentSpan[i]; 771if (CurrentSpan[CurrentSpanIndex].Equals(next))
System.Memory.Data (1)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (1)
89return _position < s.Length ? s[_position++] : -1;
System.Net.HttpListener (5)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
System.Net.Mail (49)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return 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\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)
105if ((buffer[i] == '\r') && ((i + 1) < buffer.Length) && (buffer[i + 1] == '\n')) 110else if ((WriteState.CurrentLineLength == 0) && (buffer[i] == '.')) 115WriteState.Append(buffer[i]); 120WriteState.Append(buffer[i]);
System\Net\Mime\QEncodedStream.cs (5)
94byte b1 = HexDecodeMap[source[0]]; 95byte b2 = HexDecodeMap[source[1]]; 111byte b1 = HexDecodeMap[ReadState.Byte]; 164byte b1 = HexDecodeMap[source[1]]; 165byte b2 = HexDecodeMap[source[2]];
System\Net\Mime\QuotedPrintableStream.cs (26)
123byte b1 = HexDecodeMap[source[0]]; 124byte b2 = HexDecodeMap[source[1]]; 140byte b1 = HexDecodeMap[ReadState.Byte]; 185byte b1 = HexDecodeMap[source[1]]; 186byte b2 = HexDecodeMap[source[2]]; 211if ((_lineLength != -1 && WriteState.CurrentLineLength + SizeOfEncodedChar + 2 >= _lineLength && (buffer[processed] == ' ' || 212buffer[processed] == '\t' || buffer[processed] == '\r' || buffer[processed] == '\n')) || 228if (buffer[processed] == '\r' && processed + 1 < buffer.Length && buffer[processed + 1] == '\n') 247else if ((buffer[processed] < 32 && buffer[processed] != '\t') || 248buffer[processed] == '=' || 249buffer[processed] > 126) 259WriteState.Append(HexEncodeMap[buffer[processed] >> 4]); 261WriteState.Append(HexEncodeMap[buffer[processed] & 0xF]); 271if ((buffer[processed] == (byte)'\t' || buffer[processed] == (byte)' ') && 282WriteState.Append(HexEncodeMap[buffer[processed] >> 4]); 284WriteState.Append(HexEncodeMap[buffer[processed] & 0xF]); 288WriteState.Append(buffer[processed]);
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.ServerSentEvents (2)
System\Net\ServerSentEvents\SseFormatter.cs (2)
153if (data[i++] == '\r' && i < data.Length && data[i] == '\n')
System.Net.WebClient (5)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
System.Numerics.Tensors (155)
System\Numerics\Tensors\netcore\Tensor.cs (65)
140nint sumOfAxis = tensors[0].Lengths[dimension]; 143if (tensors[0].Rank != tensors[i].Rank) 149if (tensors[0].Lengths[j] != tensors[i].Lengths[j]) 155sumOfAxis += tensors[i].Lengths[dimension]; 172totalLength += tensors[i].FlattenedLength; 211totalLength += tensors[i].FlattenedLength; 216nint sumOfAxis = tensors[0].Lengths[dimension]; 220if (rank != tensors[i].Rank) 226if (tensors[0].Lengths[j] != tensors[i].Lengths[j]) 230sumOfAxis += tensors[i].Lengths[dimension]; 247TensorOperation.Invoke<TensorOperation.CopyTo<T>, T, T>(tensors[i], dstSpan); 248dstSpan = dstSpan.Slice((int)tensors[i].FlattenedLength); 268Tensor<T> slice = tensors[i].Slice(ranges); 288length *= lengths[i]; 1376newLengths[i] = tensor.Lengths[tensor.Rank - 1 - i]; 1377newStrides[i] = tensor.Strides[tensor.Rank - 1 - i]; 1384if (dimensions[i] >= tensor.Lengths.Length || dimensions[i] < 0) 1388newLengths[i] = tensor.Lengths[dimensions[i]]; 1389newStrides[i] = tensor.Strides[dimensions[i]]; 1430if (lengths[i] != -1) 1432tempTotal /= lengths[i]; 1456if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1461origStrides.Add(tensor.Strides[lengthOffset - 1]); 1463origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 1502if (lengths[i] != -1) 1504tempTotal /= lengths[i]; 1529if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1536origStrides.Add(tensor.Strides[lengthOffset - 1]); 1538origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 1579if (lengths[i] != -1) 1581tempTotal /= lengths[i]; 1606if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1611origStrides.Add(tensor.Strides[lengthOffset - 1]); 1613origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 1754for (int i = (int)tensor.Lengths[dimension]; i > 0; i--) 1757dstIndexes[dimension] = new NRange(tensor.Lengths[dimension] - i, tensor.Lengths[dimension] - i + 1); 1903if (tensor.Lengths[i] != 1) 1905lengths[index] = tensor.Lengths[i]; 1906strides[index] = tensor.Strides[i]; 1917if (tensor.Lengths[dimension] != 1) 1970if (tensor.Lengths[i] != 1) 1972lengths[index] = tensor.Lengths[i]; 1973strides[index] = tensor.Strides[i]; 1984if (tensor.Lengths[dimension] != 1) 2037if (tensor.Lengths[i] != 1) 2039lengths[index] = tensor.Lengths[i]; 2040strides[index] = tensor.Strides[i]; 2051if (tensor.Lengths[dimension] != 1) 2096if (!tensors[0].Lengths.SequenceEqual(tensors[i].Lengths)) 2108outputs[i] = Unsqueeze(tensors[i], dimension); 2136if (!tensors[0].Lengths.SequenceEqual(tensors[i].Lengths)) 2148outputs[i] = Unsqueeze(tensors[i], dimension);
System\Numerics\Tensors\netcore\TensorOperation.cs (44)
136destinationIndexes[i] = destination.Lengths[i] - 1; 425destination[i] = (left[i] == right); 433destination[i] = (left[i] == right[i]); 465result = (left[i] != right); 483result = (left[i] != right[i]); 656destination[i] = T.Atan2(x[i], y); 685destination[i] = T.Atan2Pi(x[i], y); 1908destination += T.Exp(x[i]); 1926destination[i] = T.Exp(x[i]) / y; 2011destination[i] = (x[i] - y) * (x[i] - y); 2024destination[i] = (x[i] - y[i]) * (x[i] - y[i]); 2175if (x[i]) 2177destination[i] = y[i]; 2194if (x[i]) 2221destination[i] = (left[i] > right); 2229destination[i] = (left[i] > right[i]); 2261result = !(left[i] > right); 2279result = !(left[i] > right[i]); 2310destination[i] = (left[i] >= right); 2318destination[i] = (left[i] >= right[i]); 2350result = !(left[i] >= right); 2368result = !(left[i] >= right[i]); 2399destination[i] = (left[i] < right); 2407destination[i] = (left[i] < right[i]); 2439result = !(left[i] < right); 2457result = !(left[i] < right[i]); 2488destination[i] = (left[i] <= right); 2496destination[i] = (left[i] <= right[i]); 2528result = !(left[i] <= right); 2546result = !(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.IndexOfMax.cs (1)
431T current = x[i];
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (1)
614T 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)
145T power10 = roundPower10[digits];
System\Numerics\Tensors\netcore\TensorShape.cs (32)
116nint length = lengths[i]; 192nint length = lengths[strideIndex]; 396if (leftLengths[i] != rightLengths[i]) 401if (leftStrides[i] != rightStrides[i]) 427nint length = lengths[rankIndex]; 428nint stride = strides[rankIndex]; 437if (index < destinationLengths[destinationRankIndex]) 457nint length = destinationLengths[rankIndex]; 492nint length = lengths[rankIndex]; 493nint stride = strides[rankIndex]; 512indexes[destinationRankIndex] = lengths[rankIndex]; 522nint length = destinationLengths[rankIndex]; 549if (ranges[i].Start.Value >= lengths[i]) 603nint length1 = lengths1[i]; 604nint length2 = lengths2[i]; 633nint stride1 = strides1[i]; 634nint stride2 = strides2[i]; 674nint length1 = lengths1[i]; 675nint length2 = lengths2[i]; 805int offset = start[index]; 1002nint offset = TGetOffsetAndLength.GetOffset(state[i], lengths[i]); 1003linearOffset += (offset * strides[i]); 1025nint length = lengths[rankIndex]; 1028linearOffset += (remainder * strides[rankIndex]); 1093nint previousLength = previousLengths[i]; 1094nint previousStride = previousStrides[i]; 1096(nint offset, nint length) = TGetOffsetAndLength.GetOffsetAndLength(state[i], previousLength); 1180nint stride = strides[index]; 1193nint length = lengths[index];
System.Private.CoreLib (829)
src\Internal\VersionResilientHashCode.CoreCLR.cs (1)
72int argumentHashCode = TypeHashCode(instantiation[i]);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
80while (length > 0 && buffer[length - 1] <= 32)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
src\libraries\Common\src\System\IO\PathInternal.cs (9)
131if (IsDirectorySeparator(path[skip - 1])) 144char c = path[i]; 150if (IsDirectorySeparator(path[i + 1])) 157if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 158path[i + 1] == '.') 167(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 168path[i + 1] == '.' && path[i + 2] == '.') 209sb.Append(path[rootLength - 1]);
src\libraries\Common\src\System\Memory\FixedBufferExtensions.cs (2)
43if (value[i] == '\0' || value[i] != span[i]) 49return i == span.Length || span[i] == '\0';
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\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
350ch = _input[_index++];
src\libraries\System.Private.CoreLib\src\System\Array.cs (1)
745int index = indices[i] - Unsafe.Add(ref bounds, indices.Length + i);
src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (2)
820byte b = src[i++]; 825b = src[i++];
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\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (2)
393destination[i] = ReverseEndianness(source[i]); 401destination[i] = ReverseEndianness(source[i]);
src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (1)
113uint digit = format[srcIndex] - 48u; // '0'
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (4)
464if (IsWhiteSpace(source[encodedIdx])) 470buffer[bufferIdx] = source[encodedIdx]; 526if (!IsWhiteSpace(source[i])) 1455if (!IsWhiteSpace(span[i]))
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\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (4)
221if (IsWhiteSpace(source[encodedIdx])) 227buffer[bufferIdx] = source[encodedIdx]; 283if (!IsWhiteSpace(source[i])) 843if (!IsWhiteSpace(span[i]))
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlValidator.cs (1)
117int decoded = default(Base64UrlDecoderByte).DecodingMap[lastChar];
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.Helpers.cs (1)
150int totalDays = (yearMinusOne * 365) + (yearMinusOne / 4) - (yearMinusOne / 100) + (yearMinusOne / 400) + days[month - 1] + day - 1;
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\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\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\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\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\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\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\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\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\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\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\libraries\System.Private.CoreLib\src\System\Char.cs (8)
98return (UnicodeCategory)(Latin1CharInfo[c] & UnicodeCategoryMask); 388return (Latin1CharInfo[c] & (IsUpperCaseLetterFlag | IsLowerCaseLetterFlag)) != 0; 396return (Latin1CharInfo[c] & IsWhiteSpaceFlag) != 0; 423return (Latin1CharInfo[c] & IsUpperCaseLetterFlag) != 0; 437return (Latin1CharInfo[c] & IsLowerCaseLetterFlag) != 0; 683return (Latin1CharInfo[c] & (IsUpperCaseLetterFlag | IsLowerCaseLetterFlag)) != 0; 720return (Latin1CharInfo[c] & IsLowerCaseLetterFlag) != 0; 909return (Latin1CharInfo[c] & IsUpperCaseLetterFlag) != 0;
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
2698if (!chars[indexOfFirstNonSpace].IsSpace()) 2747if (!chars[i].IsSpace()) 2770char c = chars[i];
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; 1995if ((uint)day > days[month] - days[month - 1]) 1999ulong ticks = (DaysToYear((uint)year) + days[month - 1] + (uint)day - 1) * (ulong)TimeSpan.TicksPerDay;
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (19)
1026low64 = Math.BigMul((uint)low64, UInt32Powers10[scale]); 1038power = UInt32Powers10[scale]; 1051power = UInt32Powers10[scale]; 1079power = UInt32Powers10[scale]; 1371uint power = scale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[scale]; 1427ulong power = UInt64Powers10[scale]; 1603dbl *= DoublePowers10[power]; 1645result.Low64 = Math.BigMul(mant, UInt32Powers10[power]); 1653ulong low64 = Math.BigMul(mant, UInt32Powers10[power - 18]); 1658ulong low64 = Math.BigMul(mant, UInt32Powers10[power - 9]); 1763dbl *= DoublePowers10[power]; 1805uint pow10 = UInt32Powers10[power]; 1819UInt64x64To128(mant, UInt64Powers10[power - 1], ref result); 1907(double)value.High * ds2to64) / DoublePowers10[value.Scale]; 2005power = UInt32Powers10[curScale]; 2083power = UInt32Powers10[curScale]; 2154power = UInt32Powers10[curScale]; 2239uint power = scale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[scale]; 2262uint power = iCurScale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[iCurScale];
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (25)
133if (par[j].DefaultValue == DBNull.Value) 140if (par[j].DefaultValue == DBNull.Value) 142if (!par[j].ParameterType.IsArray) 145if (!par[j].IsDefined(typeof(ParamArrayAttribute), true)) 148paramArrayType = par[j].ParameterType.GetElementType(); 158if (!par[lastArgPos].ParameterType.IsArray) 161if (!par[lastArgPos].IsDefined(typeof(ParamArrayAttribute), true)) 167paramArrayType = par[lastArgPos].ParameterType.GetElementType(); 175if (par[lastArgPos].ParameterType.IsArray 176&& par[lastArgPos].IsDefined(typeof(ParamArrayAttribute), true) 179if (!par[lastArgPos].ParameterType.IsAssignableFrom(argTypes[lastArgPos])) 180paramArrayType = par[lastArgPos].ParameterType.GetElementType(); 194pCls = par[j].ParameterType; 244if (defaultValueBinding && par[j].HasDefaultValue) 342objs[i] = parms[i].DefaultValue; 421objs[i] = parameters[i].DefaultValue; 429objs[i] = parameters[i].DefaultValue; 570Type pCls = par[j].ParameterType; 571if (types[j].MatchesParameterTypeExactly(par[j])) 808Type pCls = par[j].ParameterType; 897c1 = p1[paramOrder1[i]].ParameterType; 902c2 = p2[paramOrder2[i]].ParameterType; 1108if (params1[i].ParameterType != params2[i].ParameterType) 1197if (names[i].Equals(pars[j].Name))
src\libraries\System.Private.CoreLib\src\System\Delegate.cs (1)
47d = Combine(d, delegates[i]);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (3)
313if (pi[j].ParameterType != null) 314typeName = pi[j].ParameterType.Name; 316string? parameterName = pi[j].Name;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (2)
111if (payload[j - 1] == (byte)(0) && payload[j] == (byte)(0))
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2113string name = names[foundItems[i]];
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (1)
131sum += (coefficients[i] * indeterminateRaised);
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\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\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\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))) 1182switch (format[i]) 1200char quoteChar = format[i++]; 1201while (i < format.Length && format[i] != quoteChar) 1254switch (format[i]) 1272char quoteChar = format[i++]; 1273while (i < length && format[i] != quoteChar)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (4)
2234if (!HebrewNumber.IsDigit(str.Value[i])) 2246state = HebrewNumber.ParseByChar(str.Value[i++], ref context); 2360char nextCh = str.Value[nextCharIndex]; 2366((value.tokenString.Length == 1 && str.Value[str.Index] == value.tokenString[0]) ||
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (48)
425char nextCh = str.Value[nextCharIndex]; 434str.m_current = str.Value[str.Index]; 573char nextCh = str.Value[str.Index]; 579nextCh = str.Value[str.Index + whitespaceCount]; 648char nextCh = str.Value[str.Index]; 1177char ch = str.Value[str.Index]; 1184ch = str.Value[i]; 3303char ch = format[i]; 3322while (i + 1 < format.Length && format[i + 1] == 'd') 4399if (parseInfo.fAllowInnerWhite && char.IsWhiteSpace(quotedSpan[i])) 4403else if (!str.Match(quotedSpan[i])) 4432if (format.Index >= format.Value.Length - 1 || format.Value[format.Index + 1] == '%') 4523char quoteChar = format[pos++]; // Get the character used to quote the following string. 4528char ch = format[pos++]; 4543result.Append(format[pos++]); 5161if (source[colonIndex] != ':') 5169uint om1 = (uint)(source[colonIndex + 1] - '0'), om2 = (uint)(source[colonIndex + 2] - '0'); 5343if (str[i] <= '\x007f') 5344buffer.Append(str[i]); 5346buffer.Append($"\\u{(int)str[i]:x4}"); 5435m_current = Value[Index]; 5452m_current = Value[Index]; 5481m_current = Value[Index]; 5512m_current = Value[Index]; 5535m_current = Value[Index]; 5616if (!char.IsWhiteSpace(Value[thisPosition + segmentLength])) 5631while (thisPosition < Value.Length && char.IsWhiteSpace(Value[thisPosition])) 5665if (char.IsLetter(Value[nextCharIndex])) 5700if ((Value[Index] == ch) || 5701(ch == ' ' && IsSpaceReplacingChar(Value[Index]))) 5750char repeatChar = Value[Index]; 5752while ((pos < Length) && (Value[pos] == repeatChar)) 5768char.IsAsciiDigit(Value[Index]); 5776return Value[Index]; 5785Debug.Assert(char.IsAsciiDigit(Value[Index]), "IsDigit(Value[Index])"); 5786return Value[Index] - '0'; 5800char ch = Value[Index + 1]; 5831m_current = Value[Index]; 5844while (i >= 0 && char.IsWhiteSpace(Value[i])) 5860char ch = Value[i]; 5864if (char.IsWhiteSpace(Value[i - 1])) 5867while (i >= 1 && char.IsWhiteSpace(Value[i - 1])) 5888char ch = Value[i]; 5892while ((i + 1) < Length && char.IsWhiteSpace(Value[i + 1])) 5914char ch = Value[Index + sub.length]; 5964m_current = Value[Index]; 5986internal char this[int relativeIndex] => s[index + relativeIndex];
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\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\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (4)
232int days = (daysArray[m] - daysArray[m - 1]); 299return days[month] - days[month - 1];
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\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\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\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\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\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (2)
229char c = s[i]; 249if ((uint)(i + 1) >= (uint)s.Length || !char.IsLowSurrogate(s[i + 1]))
src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (4)
152destination[i] = ToUpperInvariantMode(source[i]); 163char c = source[i]; 172char cl = source[i + 1]; 421byte val = (byte)(s_casingTableInit[i / 8] >> (7 - (i % 8)));
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\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\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\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\libraries\System.Private.CoreLib\src\System\Guid.cs (10)
742if ((uint)guidString.Length <= (uint)(numStart + numLen + 1) || guidString[numStart + numLen + 1] != TChar.CastFrom('{')) 799if (numStart + numLen + 1 >= guidString.Length || guidString[numStart + numLen + 1] != TChar.CastFrom('}')) 820int upper = (sbyte)lookup[byte.CreateTruncating(ch1)]; 821int lower = (sbyte)lookup[byte.CreateTruncating(ch2)]; 862for (; i < guidString.Length && guidString[i] == TChar.CastFrom('0'); i++) ; 868int c = int.CreateTruncating(guidString[i]); 892for (i = 0; i < charSpan.Length && !char.IsWhiteSpace(charSpan[i]); i++) ; 910char c = charSpan[i]; 983str[i] == TChar.CastFrom('0') && 984(str[i + 1] | TChar.CastFrom(0x20)) == TChar.CastFrom('x');
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
868if (isUnsigned == sbyte.IsNegative((sbyte)source[Size - 1]))
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
409if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(short) - 1]))
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
436if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(int) - 1]))
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
433if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(long) - 1]))
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
438if (isUnsigned == sbyte.IsNegative((sbyte)source[sizeof(nint_t) - 1]))
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemName.cs (4)
222nameChar = name[nameOffset++]; 249expressionChar = expression[expressionOffset]; 282if (name[offset] == '.') 345expressionChar = expression[expressionOffset];
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\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
556if (_byteBuffer[i] != preamble[i]) 827char matchedChar = charBufferSpan[idxOfNewline];
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
410_charBuffer[_charPos++] = buffer[i];
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (1)
192char ch = remaining[foundLineLength];
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1402double power10 = RoundPower10Double[digits];
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
439float power10 = RoundPower10Single[digits];
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (73)
895if (!EqualityComparer<T>.Default.Equals(span[i], value)) 913if (!comparer.Equals(span[i], value)) 999if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1000!EqualityComparer<T>.Default.Equals(span[i], value1)) 1018if (!comparer.Equals(span[i], value0) && 1019!comparer.Equals(span[i], value1)) 1111if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1112!EqualityComparer<T>.Default.Equals(span[i], value1) && 1113!EqualityComparer<T>.Default.Equals(span[i], value2)) 1130if (!comparer.Equals(span[i], value0) && 1131!comparer.Equals(span[i], value1) && 1132!comparer.Equals(span[i], value2)) 1245if (!values.Contains(span[i])) 1283if (!values.Contains(span[i], comparer)) 1473if (!EqualityComparer<T>.Default.Equals(span[i], value)) 1491if (!comparer.Equals(span[i], value)) 1577if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1578!EqualityComparer<T>.Default.Equals(span[i], value1)) 1596if (!comparer.Equals(span[i], value0) && 1597!comparer.Equals(span[i], value1)) 1689if (!EqualityComparer<T>.Default.Equals(span[i], value0) && 1690!EqualityComparer<T>.Default.Equals(span[i], value1) && 1691!EqualityComparer<T>.Default.Equals(span[i], value2)) 1709if (!comparer.Equals(span[i], value0) && 1710!comparer.Equals(span[i], value1) && 1711!comparer.Equals(span[i], value2)) 1825if (!values.Contains(span[i])) 1863if (!values.Contains(span[i], comparer)) 2257if (EqualityComparer<T>.Default.Equals(span[i], value)) 2274if (comparer.Equals(span[i], value)) 2462if (EqualityComparer<T>.Default.Equals(span[i], value)) 2480if (comparer.Equals(span[i], value)) 2702if (EqualityComparer<T>.Default.Equals(span[i], value0) || 2703EqualityComparer<T>.Default.Equals(span[i], value1)) 2720if (comparer.Equals(span[i], value0) || 2721comparer.Equals(span[i], value1)) 2807if (EqualityComparer<T>.Default.Equals(span[i], value0) || 2808EqualityComparer<T>.Default.Equals(span[i], value1) || 2809EqualityComparer<T>.Default.Equals(span[i], value2)) 2826if (comparer.Equals(span[i], value0) || 2827comparer.Equals(span[i], value1) || 2828comparer.Equals(span[i], value2)) 2966if (values.Contains(span[i], comparer)) 3122if (EqualityComparer<T>.Default.Equals(span[i], value0) || 3123EqualityComparer<T>.Default.Equals(span[i], value1)) 3141if (comparer.Equals(span[i], value0) || 3142comparer.Equals(span[i], value1)) 3228if (EqualityComparer<T>.Default.Equals(span[i], value0) || 3229EqualityComparer<T>.Default.Equals(span[i], value1) || 3230EqualityComparer<T>.Default.Equals(span[i], value2)) 3248if (comparer.Equals(span[i], value0) || 3249comparer.Equals(span[i], value1) || 3250comparer.Equals(span[i], value2)) 3388if (values.Contains(span[i], comparer)) 3478if (!EqualityComparer<T>.Default.Equals(span[i], other[i])) 3492if (!comparer.Equals(span[i], other[i])) 3537int c = comparer.Compare(span[i], other[i]); 4740destination[i] = EqualityComparer<T>.Default.Equals(source[i], oldValue) ? newValue : source[i]; 4752destination[i] = comparer.Equals(source[i], oldValue) ? newValue : source[i]; 4914if (!EqualityComparer<T>.Default.Equals(span[i], other[i])) 4946if (!comparer.Equals(span[i], other[i])) 5347while (startInclusive < endExclusive && char.IsWhiteSpace(source[startInclusive])) 5352while (endExclusive > startInclusive && char.IsWhiteSpace(source[endExclusive - 1])) 5464if (EqualityComparer<T>.Default.Equals(span[i], value)) 5483if (comparer.Equals(span[i], value)) 5803appended = handler.AppendFormatted(args[index], segment.Alignment, segment.Format);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (1)
21if (!char.IsWhiteSpace(span[i]))
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\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\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (3)
1425*(--p) = sNegative[i]; 1858*(--p) = sNegative[i]; 2288*(--p) = sNegative[i];
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\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (3)
1021double scale = Pow10DoubleTable[fastExponent]; 1395ulong high = Math.BigMul(w, Pow5128Table[index], out ulong low); 1401ulong high2 = Math.BigMul(w, Pow5128Table[index + 1], out ulong _);
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (18)
259num = TChar.CastToUInt32(value[index]); 279num = TChar.CastToUInt32(value[index]); 289num = TChar.CastToUInt32(value[index]); 301num = TChar.CastToUInt32(value[index]); 319num = TChar.CastToUInt32(value[index]); 330num = TChar.CastToUInt32(value[index]); 351num = TChar.CastToUInt32(value[index]); 382num = TChar.CastToUInt32(value[index]); 406num = TChar.CastToUInt32(value[index]); 439num = TChar.CastToUInt32(value[index]); 450num = TChar.CastToUInt32(value[index]); 497uint ch = TChar.CastToUInt32(value[index]); 580num = TChar.CastToUInt32(value[index]); 601num = TChar.CastToUInt32(value[index]); 620num = TChar.CastToUInt32(value[index]); 640num = TChar.CastToUInt32(value[index]); 657num = TChar.CastToUInt32(value[index]); 699uint ch = TChar.CastToUInt32(value[index]);
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\libraries\System.Private.CoreLib\src\System\Random.cs (3)
235destination[i] = choices[randomBytes[i] & mask]; 272destination[i++] = choices[masked]; 286destination[i] = choices[Next(choices.Length)];
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (5)
393if (shouldCopyBack[i]) 397Debug.Assert(copyOfParameters[i] != null); 398Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 399dest![i] = RuntimeMethodHandle.ReboxFromNullable(copyOfParameters[i]); 403dest![i] = copyOfParameters[i];
src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (1)
52Type c = p[i].ParameterType;
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (3)
52RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; 120RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; 186RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
136parameterTypes[i] = paramInfo[i].ParameterType;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (1)
356object? arg = parameters[i];
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\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (2)
85return args[PositionImpl]; 94return args[PositionImpl];
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeNameResolver.cs (1)
112Type? genericArg = Resolve(genericArgs[i]);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (1)
433yield return memory.Span[i];
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
390if (isUnsigned == IsNegative((sbyte)source[sizeof(sbyte) - 1]))
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (1)
51int c = values[i];
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\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (1)
54frequency += CharacterFrequencyHelper.AsciiFrequency[i];
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickBuilder.cs (2)
31Debug.Assert(values[i - 1].Length <= values[i].Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
113float newFrequency = char.IsAscii(childChar) ? CharacterFrequencyHelper.AsciiFrequency[childChar] : -1;
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\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\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValuesBase.cs (2)
59if (TNegator.NegateIfNeeded(ContainsCore(span[i]))) 73if (TNegator.NegateIfNeeded(ContainsCore(span[i])))
src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (1)
334sb.Append(span.Slice(0, pos)).Append(GetEscapeSequence(span[pos]));
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
113if (startupHookPart.Contains(disallowedSimpleAssemblyNameChars[j]))
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (26)
112object? value = args[i]; 410string? value = values[i]; 433string? value = values[i]; 685handler.AppendFormatted(args[index], segment.Alignment, segment.Format); 900object? value = values[i]; 1081if (values[i] is string value) 1427int replacementIdx = indices[r]; 1576if (text[idx] == '\r') 1579if ((uint)nextCharIdx < (uint)text.Length && text[nextCharIdx] == '\n') 1593else if (replacementText.Length != 1 || replacementText[0] != text[idx]) 1624stride = remaining[idx] == '\r' && (uint)(idx + 1) < (uint)remaining.Length && remaining[idx + 1] == '\n' ? 2 : 1; 1876splitStrings[arrIndex++] = Substring(currIndex, sepList[i] - currIndex); 1877currIndex = sepList[i] + (lengthList.IsEmpty ? defaultLength : lengthList[i]); 1916thisEntry = this.AsSpan(currIndex, sepList[i] - currIndex); 1925currIndex = sepList[i] + (lengthList.IsEmpty ? defaultLength : lengthList[i]); 1935thisEntry = this.AsSpan(currIndex, sepList[i] - currIndex); 1944currIndex = sepList[i] + (lengthList.IsEmpty ? defaultLength : lengthList[i]); 1983if (char.IsWhiteSpace(source[i])) 2005char c = source[i]; 2022if (ProbabilisticMap.Contains(ref charMap, separators, source[i])) 2184string? separator = separators[j]; 2190if (source[i] == separator[0] && currentSepLength <= source.Length - i)
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\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\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (2)
388dest[total++] = srcLeft[i]; 400dest[total++] = srcRight[i];
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\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (18)
69result = string.CompareOrdinal(invariantName, EncodingNames.AsSpan(EncodingNameIndices[index], EncodingNameIndices[index + 1] - EncodingNameIndices[index])); 74return CodePagesByName[index]; 92if (invariantName.SequenceEqual(EncodingNames.AsSpan(EncodingNameIndices[left], EncodingNameIndices[left + 1] - EncodingNameIndices[left]))) 94return CodePagesByName[left]; 118int codePage = mappedCodePages[i]; 126webNames[webNameIndices[i]..webNameIndices[i + 1]], 144int codePage = mappedCodePages[i]; 153encodingInfoList[codePage] = new EncodingInfo(codePage, webNames[webNameIndices[i]..webNameIndices[i + 1]], 227int uiFamilyCodePage = UiFamilyCodePages[index]; 228string webName = WebNames[WebNameIndices[index]..WebNameIndices[index + 1]]; 233uint flags = Flags[index];
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (7)
583char finalChar = source[index]; 599char penultimateChar = source[index]; 643uint tempValue = source[index]; 681if ((sbyte)source[index] >= -64) 1238return (UnicodeCategory)(AsciiCharInfo[value.Value] & UnicodeCategoryMask); 1339return (AsciiCharInfo[value.Value] & IsLetterOrDigitFlag) != 0; 1402return (AsciiCharInfo[value.Value] & IsWhiteSpaceFlag) != 0;
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\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (7)
1282if (values[i] != null) 1284Append(values[i]!.ToString()); 1703object? arg = args[index]; 1923handler.AppendFormatted(args[index], segment.Alignment, segment.Format); 2384int gapStart = replacements[i] + removeCount; 2391int gapEnd = replacements[i]; 2440if (value[i] != chunk.m_ChunkChars[indexInChunk])
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (1)
297destination[i] = (char)(0xDF00 | source[i]);
src\libraries\System.Private.CoreLib\src\System\Text\ValueStringBuilder.AppendFormat.cs (1)
198object? arg = args[index];
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
958if (tokens[i].CanBeCanceled) 960_linkingRegistrations[i] = tokens[i].UnsafeRegister(s_linkedTokenCancelDelegate, this);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
4980Task task = tasks[i];
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (6)
251WaitHandle waitHandle = waitHandles[i] ?? throw new ArgumentNullException($"waitHandles[{i}]", SR.ArgumentNull_ArrayElement); 340throw new AbandonedMutexException(waitResult, waitHandles[waitResult]); 380Debug.Assert(safeWaitHandles[i] != null); 381unsafeWaitHandles[i] = safeWaitHandles[i].DangerousGetHandle(); 390Debug.Assert(safeWaitHandles[i] != null); 391unsafeWaitHandles[i] = safeWaitHandles[i].DangerousGetHandle();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (12)
931if ((uint)index >= (uint)date.Length || !char.IsAsciiDigit(date[index])) 940julianDay = julianDay * 10 + (int)(date[index] - '0'); 942} while ((uint)index < (uint)date.Length && char.IsAsciiDigit(date[index])); 946if (julianDay == 0 || julianDay > days[days.Length - 1]) 952while (i < days.Length && julianDay > days[i]) 960day = julianDay - days[i - 1]; 1023if (index < posixFormat.Length && posixFormat[index] == ',') 1028if (index < posixFormat.Length && posixFormat[index] == ',') 1041bool isBracketEnclosed = index < posixFormat.Length && posixFormat[index] == '<'; 1050if (index < posixFormat.Length && posixFormat[index] == '>') 1074if (index < posixFormat.Length && posixFormat[index] == '/') 1092char current = posixFormat[index];
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
65if ((AsciiBitmap[value] & (1 << (c & 7))) == 0)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (2)
1103ulong digit = (leftElement + carry) + right[i]; 1274carry += right[i] * q;
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (8)
46if (input[offset] == EscapeCharacter) // this is very rare (IL Emit or pure IL) 53isNestedType = offset > 0 && offset < input.Length && input[offset] == '+'; 61char c = input[offset]; 67!NeedsEscaping(input[offset])) // invalid name, escapes a char that does not need escaping 90if (index > 0 && fullName[index - 1] == '.') 144if (offset > 0 && input[offset - 1] == EscapeCharacter) // this should be very rare (IL Emit & pure IL) 156if (input[offset] is ']') 158if (input[offset - 1] != EscapeCharacter)
src\System\Reflection\Emit\DynamicILGenerator.cs (3)
420parameterTypes[i] = paramInfo[i].ParameterType; 421requiredCustomModifiers[i] = paramInfo[i].GetRequiredCustomModifiers(); 422optionalCustomModifiers[i] = paramInfo[i].GetOptionalCustomModifiers();
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (3)
466parameterTypes[i] = parameters[i].ParameterType; 467requiredCustomModifiers[i] = parameters[i].GetRequiredCustomModifiers(); 468optionalCustomModifiers[i] = parameters[i].GetOptionalCustomModifiers();
src\System\Reflection\RuntimeCustomAttributeData.cs (1)
268m_ctorParams[i] = new CustomAttributeCtorParameter(new CustomAttributeType((RuntimeType)parameters[i].ParameterType));
src\System\Reflection\TypeNameResolver.CoreCLR.cs (3)
327type = type.GetNestedType(nestedTypeNames[i], bindingFlags); 334nestedTypeNames[i], (i > 0) ? nestedTypeNames[i - 1] : TypeName.Unescape(escapedTypeName)),
src\System\RuntimeType.CoreCLR.cs (2)
2320if (!parameterInfos[argumentTypes.Length].IsOptional) 2361if (argumentTypes[i] is Type t && !t.MatchesParameterTypeExactly(parameterInfos[i]))
System.Private.DataContractSerialization (24)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return 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) 680if ((CharTypeMap[ch] & CharType.FirstName) == 0) 687if ((CharTypeMap[ch] & CharType.Name) == 0) 711if ((CharTypeMap[ch] & CharType.FirstName) == 0) 718if ((CharTypeMap[ch] & CharType.Name) == 0) 751while (offset < offsetMax && (charTypeMap[buffer[offset]] & CharType.AttributeText) != 0) 855while ((CharTypeMap[ch] & CharType.Whitespace) != 0) 949while ((CharTypeMap[ch] & CharType.Whitespace) != 0) 1015if ((CharTypeMap[b] & CharType.Comment) == 0) 1129while (offset < offsetMax && (charTypeMap[buffer[offset]] & CharType.SpecialWhitespace) != 0) 1138while (offset < offsetMax && (charTypeMap[buffer[offset]] & CharType.Text) != 0) 1149while (offset < offsetMax && ((charTypeMap[buffer[offset]] & CharType.Text) != 0 || buffer[offset] == 0xEF)) 1277if (ch < 256 && (CharTypeMap[ch] & CharType.Whitespace) != 0) 1336else if ((CharTypeMap[ch] & CharType.SpecialWhitespace) != 0) 1344else if ((CharTypeMap[ch] & CharType.Text) != 0)
System.Private.Uri (24)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (1)
46for (; (start < end) && (ch = ToUShort(str[start])) != '.' && ch != ':'; ++start)
src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (16)
23if (numbers[i] == 0) 325for (int i = (address[0] == TChar.CreateTruncating('[') ? 1 : 0); i < address.Length && address[i] != TChar.CreateTruncating(']');) 327currentCh = IPv4AddressHelper.ToUShort(address[i]); 341for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']') && address[i] != TChar.CreateTruncating('/'); ++i) 347for (; i < address.Length && address[i] != TChar.CreateTruncating(']'); ++i) 357if (address[i] == TChar.CreateTruncating(':')) 373(address[j] != TChar.CreateTruncating(']')) && 374(address[j] != TChar.CreateTruncating(':')) && 375(address[j] != TChar.CreateTruncating('%')) && 376(address[j] != TChar.CreateTruncating('/')) && 380if (address[j] == TChar.CreateTruncating('.')) 388while (j < address.Length && (address[j] != TChar.CreateTruncating(']')) && (address[j] != TChar.CreateTruncating('/')) && (address[j] != TChar.CreateTruncating('%'))) 414for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']'); i++)
System\DomainNameHelper.cs (1)
108char c = hostname[invalidCharOrDelimiterIndex];
System\Uri.cs (1)
4351if (dosPathIdx != 0 && str[dosPathIdx + _info.Offset.Path - 1] == '|')
System.Private.Windows.Core (4)
System\IO\Compression\RunLengthEncoder.cs (1)
46length += encoded[i];
Windows\Win32\Graphics\Gdi\ARGB.cs (1)
52colors[i] = argbColors[i];
Windows\Win32\System\Com\SAFEARRAY.cs (2)
88dimensionSize *= bounds[boundIndex--].cElements; 90int diff = (indices[indicesIndex++] - bounds[boundIndex].lLbound);
System.Private.Windows.GdiPlus (2)
System\Drawing\ImageCodecInfoHelper.cs (2)
56s_encoders[i] = (codecInfo[i].FormatID, codecInfo[i].Clsid);
System.Private.Xml (51)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return 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] == '='); 178if (!XmlCharType.IsWhiteSpace(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)
9583switch (chars[i]) 9597if ((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)
603while (n >= days[month]) 606day = n - days[month - 1] + 1; 969fraction *= 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 (16)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
350ch = _input[_index++];
System\Reflection\Internal\Utilities\Hash.cs (1)
49hashCode = 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)
46if (input[offset] == EscapeCharacter) // this is very rare (IL Emit or pure IL) 53isNestedType = offset > 0 && offset < input.Length && input[offset] == '+'; 61char c = input[offset]; 67!NeedsEscaping(input[offset])) // invalid name, escapes a char that does not need escaping 90if (index > 0 && fullName[index - 1] == '.') 144if (offset > 0 && input[offset - 1] == EscapeCharacter) // this should be very rare (IL Emit & pure IL) 156if (input[offset] is ']') 158if (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.Numerics (65)
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 (13)
151if (!IsWhite(uint.CreateTruncating(value[whiteIndex]))) 163if (!IsWhite(uint.CreateTruncating(value[whiteIndex]))) 512uint multiplier = UInt32PowersOfTen[remainingTrailingZeroCount]; 529uint carry = MultiplyAdd(bits.Slice(0, resultLength), PowersOf1e9.TenPowMaxPartial, base1E9[i]); 931bufferEnd = UInt32ToDecChars(bufferEnd, base1E9Value[i], PowersOf1e9.MaxPartialDigits); 1069Debug.Assert(2 * src.Length - (Indexes[i + 1] - Indexes[i]) is 0 or 1); 1075toExclusive = Indexes[i + 1]; 1088bufferSize = Indexes[index]; 1101int from = Indexes[index]; 1102int toExclusive = Indexes[index + 1]; 1117BigIntegerCalculator.Multiply(left, UInt32PowersOfTen[trailingZeroCount], bits.Slice(0, left.Length + 1)); 1190uint multiplier = UInt32PowersOfTen[remainingTrailingZeroCount];
System\Numerics\BigInteger.cs (7)
283byte mostSignificantByte = isBigEndian ? value[0] : value[byteCount - 1]; 293while (offset < byteCount && value[offset] == 0) 305while (byteCount >= 0 && value[byteCount] == 0) 336_sign = (_sign << 8) | value[i]; 343_sign = (_sign << 8) | value[i]; 409byte curByteValue = value[curByte]; 417byte curByteValue = value[curByte];
System\Numerics\BigIntegerCalculator.AddSub.cs (6)
76long digit = (Unsafe.Add(ref leftPtr, i) + carry) + right[i]; 152long digit = (Unsafe.Add(ref leftPtr, i) + carry) - right[i]; 181carry += left[i]; 192carry += left[i]; 228carry += left[i]; 237carry += left[i];
System\Numerics\BigIntegerCalculator.DivRem.cs (7)
46ulong value = (carry << 32) | left[i]; 61ulong value = (carry << 32) | left[i]; 223uint divHi = right[right.Length - 1]; 224uint divLo = right.Length > 1 ? right[right.Length - 2] : 0; 233uint divNx = right.Length > 2 ? right[right.Length - 3] : 0; 304ulong digit = (leftElement + carry) + right[i]; 324carry += right[i] * q;
System\Numerics\BigIntegerCalculator.GcdInv.cs (9)
232ulong xh = xBuffer[xBuffer.Length - 1]; 233ulong xm = xBuffer[xBuffer.Length - 2]; 234ulong xl = xBuffer[xBuffer.Length - 3]; 242yh = yBuffer[yBuffer.Length - 1]; 243ym = yBuffer[yBuffer.Length - 2]; 244yl = yBuffer[yBuffer.Length - 3]; 249ym = yBuffer[yBuffer.Length - 1]; 250yl = yBuffer[yBuffer.Length - 2]; 256yl = yBuffer[yBuffer.Length - 1];
System\Numerics\BigIntegerCalculator.PowMod.cs (6)
172uint p = power[i]; 182return PowCore(value, power[power.Length - 1], modulus, result); 442uint p = power[i]; 456return PowCore(value, valueLength, power[power.Length - 1], modulus, result, resultLength, temp); 501uint p = power[i]; 515return PowCore(value, valueLength, power[power.Length - 1], reducer, result, resultLength, temp);
System\Numerics\BigIntegerCalculator.SquMul.cs (7)
54uint v = value[i]; 58ulong digit2 = (ulong)value[j] * v; 145ulong digits = (ulong)left[i] * right + carry; 348uint rv = right[i]; 353ulong digits = elementPtr + carry + (ulong)left[j] * rv; 384long digit = (Unsafe.Add(ref corePtr, i) + carry) - Unsafe.Add(ref leftPtr, i) - right[i]; 391long digit = (Unsafe.Add(ref corePtr, i) + carry) - left[i];
System\Numerics\BigIntegerCalculator.Utils.cs (5)
27while (--iv >= 0 && left[iv] == right[iv]) ; 31return left[iv] < right[iv] ? -1 : 1; 61while (length > 0 && value[length - 1] == 0)
System\Numerics\Complex.cs (1)
2122if (char.IsWhiteSpace(s[semicolon + 1]))
System.Security.Cryptography.Pkcs (10)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.manual.cs (1)
39Rc2EkbEncoding[keySize];
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\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
80while (length > 0 && buffer[length - 1] <= 32)
System.Security.Cryptography.Xml (5)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
System.Text.Encoding.CodePages (23)
System\Text\EncodingTable.cs (15)
42item = (MappedFamilyCodePage[i], MappedFlags[i]); 112Debug.Assert(encodingNameIndices[encodingNameIndices.Length - 1] == EncodingNames.Length); 123result = CompareOrdinal(name, EncodingNames, encodingNameIndices[index], encodingNameIndices[index + 1] - encodingNameIndices[index]); 127return CodePagesByName[index]; 145if (CompareOrdinal(name, EncodingNames, encodingNameIndices[left], encodingNameIndices[left + 1] - encodingNameIndices[left]) == 0) 147return CodePagesByName[left]; 186Debug.Assert(indices[indices.Length - 1] == names.Length); 211name = 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 (10)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return 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])) 406if ((uint)asciiCharsSkipped >= (uint)data.Length || char.IsAscii(data[asciiCharsSkipped]))
System.Text.Json (154)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
50char current = chars[i]; 75if (i + 1 < chars.Length && char.IsLower(chars[i + 1]))
System\Text\Json\JsonHelpers.cs (2)
455if (span[i] == '.') 473Debug.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++]; 543int totalDays = (yearMinusOne * 365) + (yearMinusOne / 4) - (yearMinusOne / 100) + (yearMinusOne / 400) + days[parseData.Month - 1] + parseData.Day - 1;
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (14)
458Debug.Assert(source[idx] == JsonConstants.BackSlash); 482Debug.Assert(source[idx] == JsonConstants.BackSlash); 494Debug.Assert(source[idx] == JsonConstants.BackSlash); 528Debug.Assert(source[idx] == 'u', "invalid escape sequences must have already been caught by Utf8JsonReader.Read()"); 550if (source.Length < idx + 7 || source[idx + 1] != '\\' || source[idx + 2] != 'u') 592if (source[idx] != JsonConstants.BackSlash) 610destination[written++] = source[idx++]; 613destination[written++] = source[idx++]; 614destination[written++] = source[idx++]; 617destination[written++] = source[idx++]; 618destination[written++] = source[idx++]; 619destination[written++] = source[idx++]; 628Debug.Assert(idx == source.Length || source[idx] == JsonConstants.BackSlash);
System\Text\Json\Reader\Utf8JsonReader.cs (49)
826byte first = _buffer[_consumed]; 839first = _buffer[_consumed]; 1013byte val = localBuffer[_consumed]; 1103marker = _buffer[_consumed]; 1113marker = _buffer[_consumed]; 1161if (span[i] != literal[i]) 1223ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 1232JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0) 1252byte first = _buffer[_consumed]; 1264first = _buffer[_consumed]; 1282Debug.Assert(_buffer[_consumed] == JsonConstants.Quote); 1295byte foundByte = localBuffer[idx]; 1327Debug.Assert(data[idx] != JsonConstants.Quote); 1328Debug.Assert(data[idx] == JsonConstants.BackSlash || data[idx] < JsonConstants.Space); 1338byte currentByte = data[idx]; 1409byte nextByte = data[j]; 1441byte nextByte = data[i]; 1457nextByte = data[i]; 1473nextByte = data[i]; 1497nextByte = data[i]; 1530ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1540byte nextByte = data[i]; 1555nextByte = data[i]; 1567Debug.Assert(data[i] == (byte)'0'); 1572nextByte = data[i]; 1592nextByte = data[i]; 1609nextByte = data[i]; 1648byte nextByte = data[i]; 1671byte nextByte = data[i]; 1684nextByte = data[i]; 1770byte first = _buffer[_consumed]; 1781first = _buffer[_consumed]; 1859byte first = _buffer[_consumed]; 1869first = _buffer[_consumed]; 1907first = _buffer[_consumed]; 1918first = _buffer[_consumed]; 2094marker = _buffer[_consumed]; 2104marker = _buffer[_consumed]; 2130marker = _buffer[_consumed]; 2141marker = _buffer[_consumed]; 2239marker = _buffer[_consumed]; 2250marker = _buffer[_consumed]; 2350if (localBuffer[idx] == JsonConstants.LineFeed) 2356Debug.Assert(localBuffer[idx] == JsonConstants.CarriageReturn); 2360if (localBuffer[idx + 1] == JsonConstants.LineFeed) 2416if (localBuffer[idx] != JsonConstants.StartingByteOfNonStandardSeparator) 2461if (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.IndexOf(_buffer[_consumed]) >= 0) 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)
493if (span[pos] == '~') 499Debug.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)
389JsonPropertyInfo 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\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 (5)
51private static bool NeedsEscaping(byte value) => AllowList[value] == 0; 53private static bool NeedsEscapingNoBoundsCheck(char value) => AllowList[value] == 0; 130byte val = value[indexOfFirstByteToEscape]; 216ThrowHelper.ThrowArgumentException_InvalidUTF16(value[encoderCharsWritten]); 248char 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\libraries\Common\src\SourceGenerators\SourceWriter.cs (1)
103if ((uint)lineLength > 0 && remainingText[lineLength - 1] == '\r')
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
50char current = chars[i]; 75if (i + 1 < chars.Length && char.IsLower(chars[i + 1]))
System.Text.RegularExpressions (56)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return 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)
416rangeList.Add((set[i], (char)(set[i + 1] - 1))); 421rangeList.Add((set[i], LastChar)); 1226(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1245(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1397int curcat = (short)categorySetSegment[i]; 1450int curcat = (short)category[pos]; 1512int setLength = set[SetLengthIndex]; 1522char first = set[i]; 1525char last = i < end ? (char)(set[i] - 1) : LastChar; 1552Debug.Assert(chars[index] < chars[index + 1]); 1588if (chars[chars.Length - 1] == LastChar) 1992invertedGroup[i] = (char)-(short)group[i];
System\Text\RegularExpressions\RegexFindOptimizations.cs (8)
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])) ;
System\Text\RegularExpressions\RegexInterpreter.cs (5)
207return inputSpan[i]; 302equivalences.IndexOf(inputSpan[pos]) < 0) 732if ((uint)m1 < (uint)inputSpan.Length && inputSpan[m1] != '\n') 743if ((uint)runtextpos < (uint)inputSpan.Length && inputSpan[runtextpos] != '\n') 802if (runtextpos < inputSpan.Length - 1 || ((uint)runtextpos < (uint)inputSpan.Length && inputSpan[runtextpos] != '\n'))
System\Text\RegularExpressions\RegexNode.cs (1)
1285while (c < minLength && startingSpan[c] == startingNode.Str[c]) c++;
System\Text\RegularExpressions\RegexParser.cs (5)
1963private static bool IsSpecial(char ch) => ch <= '|' && Category[ch] >= S; 1966private static bool IsSpecialOrSpace(char ch) => ch <= '|' && Category[ch] >= W; 1969private static bool IsQuantifier(char ch) => ch <= '{' && Category[ch] == Q; 1972private static bool IsSpace(char ch) => ch <= ' ' && Category[ch] == W; 1982return 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 (4)
417return ((uint)indexM1 < (uint)inputSpan.Length && RegexCharClass.IsBoundaryWordChar(inputSpan[indexM1])) != 418((uint)index < (uint)inputSpan.Length && RegexCharClass.IsBoundaryWordChar(inputSpan[index])); 433return ((uint)indexM1 < (uint)inputSpan.Length && RegexCharClass.IsECMAWordChar(inputSpan[indexM1])) != 434((uint)index < (uint)inputSpan.Length && RegexCharClass.IsECMAWordChar(inputSpan[index]));
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (2)
170result = Or(result, sets[i]); 189result = 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)
676char c = input[pos]; 1485int c = input[pos]; 1501matcher._mintermClassifier.GetMintermID(input[pos]) : 1584currentStateId = 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 (33)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCaseEquivalences.cs (2)
135ushort firstLevelLookupValue = EquivalenceFirstLevelLookup[index]; 147ushort mappingValue = EquivalenceCasingMap[index2];
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (14)
416rangeList.Add((set[i], (char)(set[i + 1] - 1))); 421rangeList.Add((set[i], LastChar)); 1226(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1245(ascii[chDiv8] & (1 << (ch & 0x7))) != 0 : 1397int curcat = (short)categorySetSegment[i]; 1450int curcat = (short)category[pos]; 1512int setLength = set[SetLengthIndex]; 1522char first = set[i]; 1525char last = i < end ? (char)(set[i] - 1) : LastChar; 1552Debug.Assert(chars[index] < chars[index + 1]); 1588if (chars[chars.Length - 1] == LastChar) 1992invertedGroup[i] = (char)-(short)group[i];
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (1)
1285while (c < minLength && startingSpan[c] == startingNode.Str[c]) c++;
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (8)
1952if (input[i] <= '|' && Category[input[i]] > 0) 1963private static bool IsSpecial(char ch) => ch <= '|' && Category[ch] >= S; 1966private static bool IsSpecialOrSpace(char ch) => ch <= '|' && Category[ch] >= W; 1969private static bool IsQuantifier(char ch) => ch <= '{' && Category[ch] == Q; 1972private static bool IsSpace(char ch) => ch <= ' ' && Category[ch] == W; 1982return ch <= '{' && Category[ch] >= Q;
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
846sum += Frequency[c];
Stubs.cs (2)
52if (span[i] != other[i])
System.Web.HttpUtility (18)
src\libraries\Common\src\System\HexConverter.cs (5)
178ToCharsBuffer(bytes[pos], chars, pos * 2, casing); 368byteLo = FromChar(chars[i + 1]); 369byteHi = FromChar(chars[i]); 390return c >= CharToHexLookup.Length ? 0xFF : CharToHexLookup[c]; 396return c > 71 ? 0xFF : CharToHexLookup[c];
System\Web\Util\HttpEncoder.cs (13)
77char ch = remaining[i]; 151char c = chars[i]; 215byte b = bytes[i]; 223int h1 = HexConverter.FromChar(bytes[i + 1]); 224int h2 = HexConverter.FromChar(bytes[i + 2]); 334char ch = value[pos]; 342if (value[pos + 1] == 'u' && pos < count - 5) 344int h1 = HexConverter.FromChar(value[pos + 2]); 345int h2 = HexConverter.FromChar(value[pos + 3]); 346int h3 = HexConverter.FromChar(value[pos + 4]); 347int h4 = HexConverter.FromChar(value[pos + 5]); 361int h1 = HexConverter.FromChar(value[pos + 1]); 362int h2 = HexConverter.FromChar(value[pos + 2]);
System.Windows.Forms (2)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs (1)
110object? obj = objects[i];
System\Windows\Forms\Rendering\ControlPaint.cs (1)
277ARGB 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.Windows.Forms.Primitives.TestUtilities (9)
Extensions\AssertExtensions.cs (6)
493if (!expected[i].Equals(actual[i])) 500message += $" Position {i}: Expected: {expected[i]}, Actual: {actual[i]}{Environment.NewLine}"; 518if (!comparer.Equals(expected, actual[i])) 520throw new XunitException($"Expected {expected?.ToString() ?? "null"} at position {i}; actual {actual[i]?.ToString() ?? "null"}");
Extensions\SpanExtensions.cs (1)
13output[i] = transform(span[i]);
Metafiles\RecordTypes\EMRPOLYPOLY16.cs (2)
79currentPoint += counts[current]; 83return new ReadOnlySpan<POINTS>(currentPoint, (int)counts[current]);
System.Windows.Forms.UI.IntegrationTests (4)
Infra\ScreenRecordService.cs (4)
288if (previousFrameLine[column] != currentFrameLine[column]) 303if (previousFrameLine[column] != currentFrameLine[column])
System.Xaml (2)
System\Xaml\Parser\GenericTypeNameScanner.cs (2)
108switch (subscript[pos]) 136if (!IsWhitespaceChar(subscript[pos]))
Test.Utilities (14)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
Text.Analyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
812if (IsAnyDirectorySeparator(path[i])) 822sb.Append(path[i]);
src\Compilers\Core\Portable\InternalUtilities\FileNameUtilities.cs (1)
55char c = path[i];
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (3)
233byte b = data[i]; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 401hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
25int comparison = comparer(span[middle], value);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (4)
126if (remaining[index] == '\r' && remaining.Length > index + 1 && remaining[index + 1] == '\n') 148if (remaining[index] == '\n' && index > 0 && remaining[index - 1] == '\r')
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Base64Utilities.cs (3)
108if (!chars[indexOfFirstNonSpace].IsSpace()) 157if (!chars[i].IsSpace()) 180char c = chars[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
495var sourceChar = source[i - 1]; 517var targetChar = target[j - 1];
xunit.assert (6)
Sdk\CollectionTracker.cs (1)
600 items[idx] = span[idx];
StringAsserts.cs (5)
930 var expectedChar = expected[expectedIndex]; 931 var actualChar = actual[actualIndex]; 1666 if (value[index] == '\r') 1669 if (index < value.Length && value[index] == '\n') 1685 if (charsWhitespace.Contains(value[index]))