231 references to Slice
Microsoft.AspNetCore.Components (2)
src\Shared\QueryStringEnumerable.cs (2)
140segment = _query.Slice(0, delimiterIndex); 154segment.Slice(0, equalIndex),
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\FormDataReader.cs (1)
148var keyValue = key.Value[startIndex..(endIndex + 1)];
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
148var keyValue = key.Value[startIndex..(endIndex + 1)];
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
78await outputStream.WriteAsync(buffer.Slice(from, length), context.RequestAborted);
Microsoft.AspNetCore.Identity (8)
Passkeys\AttestedCredentialData.cs (4)
61var aaguid = data.Slice(offset, AaguidLength); 64var credentialIdLength = BinaryPrimitives.ReadUInt16BigEndian(data.Slice(offset, CredentialIdLengthLength).Span); 72var credentialId = data.Slice(offset, credentialIdLength).ToArray(); 75var credentialPublicKey = CredentialPublicKey.Decode(data[offset..], out var read);
Passkeys\AuthenticatorData.cs (4)
107var rpIdHash = bytes.Slice(offset, RpIdHashLength); 113var signCount = BinaryPrimitives.ReadUInt32BigEndian(bytes.Slice(offset, SignCountLength).Span); 119var remaining = bytes[offset..]; 127var reader = new CborReader(bytes[offset..]);
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
78await outputStream.WriteAsync(buffer.Slice(from, length), context.RequestAborted);
Microsoft.AspNetCore.OutputCaching (2)
FormatterBinaryReader.cs (1)
187var result = _original.Slice(_offset, count);
RecyclableSequenceBuilder.cs (1)
38ReadOnlyMemory<byte> memory = _firstSegment.Memory.Slice(0, _currentSegmentIndex);
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
EndToEndBenchmarks.cs (1)
112await destination.WriteAsync(value.Slice(0, bytes), cancellationToken);
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\QueryStringEnumerable.cs (2)
140segment = _query.Slice(0, delimiterIndex); 154segment.Slice(0, equalIndex),
Microsoft.AspNetCore.WebUtilities (3)
PagedByteBuffer.cs (1)
55memory.Slice(0, copyLength).CopyTo(currentPage.AsMemory(_currentPageIndex, copyLength));
src\Shared\QueryStringEnumerable.cs (2)
140segment = _query.Slice(0, delimiterIndex); 154segment.Slice(0, equalIndex),
Microsoft.CodeAnalysis (7)
CommandLine\AnalyzerConfigSet.cs (1)
412ReadOnlyMemory<char> idSlice = key.AsMemory().Slice(diagnosticOptionPrefix.Length, diagIdLength);
CommandLine\CommandLineParser.cs (3)
204name = argMemory.Slice(1, colon - 1); 1054return arg.Slice(start, end - start); 1100var current = memory.Slice(nextPiece, i - nextPiece);
MemoryExtensions.cs (1)
98return memory.Slice(1, memory.Length - 2);
MetadataReader\MetadataHelpers.cs (2)
650result.Add(convert(nameMemory.Slice(start, len))); 658result.Add(convert(nameMemory[start..]));
Microsoft.CodeAnalysis.CSharp (2)
CommandLine\CSharpCommandLineParser.cs (2)
1820var id = valueMemory.Slice(nextIndex, index - nextIndex).Trim().ToString(); 1960alias = value.Slice(0, eqlOrQuote).ToString();
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.DocCommentFormatter.cs (1)
224var line = source.Slice(0, index);
Microsoft.CodeAnalysis.Workspaces (3)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
314arguments = id[indexOfArguments..];
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (2)
182yield return sortedNodes[startIndex..i]; 187yield return sortedNodes[startIndex..sortedNodes.Length];
Microsoft.Data.Analysis (1)
ReadOnlyDataFrameBuffer.cs (1)
24public ReadOnlyMemory<T> ReadOnlyMemory => RawReadOnlyMemory.Slice(0, Length);
Microsoft.Extensions.AI.Abstractions (2)
Contents\DataUriParser.cs (2)
43ReadOnlyMemory<char> metadata = dataUri.Slice(0, commaPos); 53metadata = metadata.Slice(0, metadata.Length - ";base64".Length);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
SerializerTests.cs (1)
314Segment first = new(chunk.Slice(0, 1), null);
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsPrimitives.cs (2)
209labels.Add(messageBuffer.Slice(currentOffset + 1, length)); 243return TryReadQNameCore(labels, totalLength, messageBuffer.Slice(0, offset), pointer, out int _, false);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\DnsPrimitivesTests.cs (1)
97Assert.False(DnsPrimitives.TryReadQName(data.Slice(0, i), 0, out _, out _));
Microsoft.ML.Core (9)
Data\ReadOnlyMemoryUtils.cs (9)
60yield return memory.Slice(ichCur, nextSep); 78yield return memory.Slice(ichCur, nextSep); 110left = memory.Slice(0, index); 111right = memory.Slice(index + 1, memory.Length - index - 1); 145left = memory.Slice(0, index); 146right = memory.Slice(index + 1, memory.Length - index - 1); 169return memory.Slice(ichMin, ichLim - ichMin); 191return memory.Slice(ichMin, ichLim - ichMin); 210return memory.Slice(0, ichLim);
Microsoft.ML.Data (3)
DataLoadSave\Binary\Codecs.cs (1)
387value = _text.AsMemory().Slice(start, (b & LengthMask) - start);
DataLoadSave\Text\TextLoaderParser.cs (2)
857return memory.Slice(0, ichLim); 1349scan.Span = text.Slice(ichMin, ichCur - ichMin);
Microsoft.ML.Tests (1)
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
254ReadOnlyMemory<char> chars = text.AsMemory().Slice(ichMin, ichLim - ichMin);
Microsoft.ML.Tokenizers (1)
Utils\BytePairEncoder.cs (1)
119private static ReadOnlyMemory<byte> SliceStartEnd(this ReadOnlyMemory<byte> memory, int start, int end) => memory.Slice(start, end - start);
Microsoft.ML.Transforms (6)
Expression\BuiltinFunctions.cs (2)
817return a.Slice(0, NormalizeIndex(lim, a.Length)); 829return a.Slice(im, il - im);
MissingValueIndicatorTransform.cs (1)
228editor.Values[slot++] = str.AsMemory().Slice(0, len);
SvmLight\SvmLightLoader.cs (2)
261left = memory.Slice(0, index); 262right = memory.Slice(index + 1, memory.Length - index - 1);
Text\TokenizingByCharacters.cs (1)
327editor.Values[i] = keyValuesStr.AsMemory().Slice(keyValuesBoundaries[i], keyValuesBoundaries[i + 1] - keyValuesBoundaries[i]);
System.Formats.Asn1 (4)
System\Formats\Asn1\AsnDecoder.cs (4)
685return bigger.Slice(offset, smaller.Length); 847return _data.Slice(0, bytesConsumed); 871return _data.Slice(contentOffset, contentLength); 901return new AsnReader(_data.Slice(start, length), RuleSet, _options);
System.Formats.Cbor (3)
System\Formats\Cbor\Reader\CborReader.cs (1)
81return _data.Slice(initialOffset, _offset - initialOffset);
System\Formats\Cbor\Reader\CborReader.String.cs (2)
117ReadOnlyMemory<byte> byteSlice = _data.Slice(_offset + bytesRead, length); 277ReadOnlyMemory<byte> encodedSlice = _data.Slice(_offset + bytesRead, byteLength);
System.IO.Compression (1)
System\IO\Compression\ZipBlocks.Async.cs (1)
200buffer[FieldLocations.DynamicData..].CopyTo(collatedHeader);
System.Memory (2)
System\Buffers\ReadOnlySequence.Helpers.cs (2)
48memory = startSegment.Memory.Slice(startIndex, endIndex - startIndex); 113return memory.Slice(startIndex, endIndex - startIndex);
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
377return connectionBuffer.Slice(0, bytesToConsume);
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (1)
190return connectionBuffer.Slice(0, bytesToConsume);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1348(buffer.Slice(0, maxSize), buffer.Slice(maxSize)) :
System.Net.Security (2)
System\Net\Security\NegotiateStream.cs (1)
524ReadOnlyMemory<byte> bufferToWrap = buffer.Slice(0, chunkBytes);
System\Net\Security\SslStream.IO.cs (1)
643await WriteSingleChunk<TIOAdapter>(buffer.Slice(0, chunkBytes), cancellationToken).ConfigureAwait(false);
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
1617ReadOnlyMemory<char> toEncode = contents.Slice(0, Math.Min(contents.Length, ChunkSize));
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.cs (6)
50return memory.Slice(start, length); 67=> memory.Slice(0, ClampEnd(memory.Span, 0, trimElement)); 278return memory.Slice(start, length); 322return memory.Slice(0, ClampEnd(memory.Span, 0, trimElements)); 548return memory.Slice(start, length); 563=> memory.Slice(0, ClampEnd(memory.Span, 0));
System.Security.Cryptography (79)
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (1)
101decoded.Parameters = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (1)
111tmpItem = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\CurveAsn.xml.cs (3)
87decoded.A = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 97decoded.B = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 110decoded.Seed = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\DigestInfoAsn.xml.cs (1)
81decoded.Digest = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
160decoded.UniversalString = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECPrivateKey.xml.cs (2)
105decoded.PrivateKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 130decoded.PublicKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\EncryptedPrivateKeyInfoAsn.xml.cs (1)
81decoded.EncryptedData = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\FieldID.xml.cs (1)
93decoded.Parameters = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (3)
228decoded.X400Address = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 234decoded.DirectoryName = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 253decoded.IPAddress = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyAsn.xml.cs (2)
116decoded.Seed = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 129decoded.ExpandedKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyBothAsn.xml.cs (2)
80decoded.Seed = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 90decoded.ExpandedKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (2)
116decoded.Seed = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 129decoded.ExpandedKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyBothAsn.xml.cs (2)
80decoded.Seed = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 90decoded.ExpandedKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (1)
98decoded.Value = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBEParameter.xml.cs (1)
80decoded.Salt = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
105decoded.Specified = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (1)
98decoded.CertValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (1)
115decoded.MacSalt = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (1)
114decoded.BagValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (1)
98decoded.SecretValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (4)
200decoded.Certificate = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 205decoded.ExtendedCertificate = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 210decoded.AttributeCertificateV1 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 215decoded.AttributeCertificateV2 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (1)
98decoded.Content = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (1)
105decoded.Content = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (1)
99decoded.EncryptedContent = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (2)
99decoded.Issuer = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 101decoded.SerialNumber = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (1)
93decoded.OtherCert = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (1)
189tmpItem = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
112decoded.SubjectKeyIdentifier = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (2)
134decoded.SignedAttributes = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 141decoded.SignatureValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\PrivateKeyInfoAsn.xml.cs (1)
105decoded.PrivateKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.xml.cs (1)
86decoded.Iv = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPrivateKeyAsn.xml.cs (8)
98decoded.Modulus = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 100decoded.PublicExponent = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 102decoded.PrivateExponent = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 104decoded.Prime1 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 106decoded.Prime2 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 108decoded.Exponent1 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 110decoded.Exponent2 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 112decoded.Coefficient = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPublicKeyAsn.xml.cs (2)
78decoded.Modulus = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 80decoded.PublicExponent = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\SpecifiedECDomain.xml.cs (3)
115decoded.Base = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 123decoded.Order = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 128decoded.Cofactor = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.xml.cs (1)
81decoded.SubjectPublicKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (1)
128decoded.ExtnValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
58ReadOnlyMemory<byte> firstValue = encodedBytes.Slice(0, firstValueLength);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (1)
143data = data.Slice(0, trimLength);
System\Security\Cryptography\CryptoStream.cs (4)
547buffer.Slice(0, _inputBlockSize - _inputBufferIndex).CopyTo(_inputBuffer.AsMemory(_inputBufferIndex)); 598numOutputBytes = TransformBlock(_transform, buffer.Slice(currentInputIndex, numWholeBlocksInBytes), tempOutputBuffer, 0); 626numOutputBytes = TransformBlock(_transform, buffer.Slice(currentInputIndex, _inputBlockSize), _outputBuffer, 0); 642buffer.Slice(currentInputIndex, bytesToWrite).CopyTo(_inputBuffer);
System\Security\Cryptography\Helpers.cs (1)
179return encodedOctetString.Slice(offset, primitive.Length);
System\Security\Cryptography\X509Certificates\Asn1\CertificateAsn.xml.cs (1)
84decoded.SignatureValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestAsn.xml.cs (1)
84decoded.SignatureValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestInfoAsn.xml.cs (1)
113decoded.Subject = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (1)
147decoded.NameRelativeToCRLIssuer = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\X509Certificates\Asn1\PolicyInformationAsn.xml.cs (1)
101decoded.PolicyQualifiers = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.xml.cs (5)
210decoded.SerialNumber = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 218decoded.Issuer = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 226decoded.Subject = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 234decoded.IssuerUniqueId = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 249decoded.SubjectUniqueId = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\X509Certificates\X500DistinguishedName.cs (1)
148var rdn = new X500RelativeDistinguishedName(rawDataMemory.Slice(offset, encodedValue.Length));
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (1)
67_singleElementValue = rawData.Slice(offset, firstValue.Length);
System.Security.Cryptography.Pkcs (55)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
190return encodedOctetString.Slice(offset, primitive.Length);
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (1)
101decoded.Parameters = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (1)
111tmpItem = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\DigestInfoAsn.xml.cs (1)
81decoded.Digest = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
160decoded.UniversalString = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\EncryptedPrivateKeyInfoAsn.xml.cs (1)
81decoded.EncryptedData = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (3)
228decoded.X400Address = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 234decoded.DirectoryName = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 253decoded.IPAddress = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (1)
98decoded.Value = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBEParameter.xml.cs (1)
80decoded.Salt = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
105decoded.Specified = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (1)
98decoded.CertValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (1)
115decoded.MacSalt = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (1)
114decoded.BagValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (1)
98decoded.SecretValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (4)
200decoded.Certificate = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 205decoded.ExtendedCertificate = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 210decoded.AttributeCertificateV1 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 215decoded.AttributeCertificateV2 = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (1)
98decoded.Content = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (1)
105decoded.Content = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (1)
99decoded.EncryptedContent = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (2)
99decoded.Issuer = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 101decoded.SerialNumber = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (1)
93decoded.OtherCert = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (1)
189tmpItem = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
112decoded.SubjectKeyIdentifier = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (2)
134decoded.SignedAttributes = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 141decoded.SignatureValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\PrivateKeyInfoAsn.xml.cs (1)
105decoded.PrivateKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.xml.cs (1)
86decoded.Iv = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.xml.cs (1)
81decoded.SubjectPublicKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (1)
128decoded.ExtnValue = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
58ReadOnlyMemory<byte> firstValue = encodedBytes.Slice(0, firstValueLength);
System\Security\Cryptography\Pkcs\Asn1\CadesIssuerSerial.xml.cs (1)
103decoded.SerialNumber = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\EssCertId.xml.cs (1)
85decoded.Hash = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\EssCertIdV2.xml.cs (1)
125decoded.Hash = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientInfoAsn.xml.cs (1)
120decoded.Ukm = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\KeyTransRecipientInfoAsn.xml.cs (1)
92decoded.EncryptedKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\MessageImprint.xml.cs (1)
81decoded.HashedMessage = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\OriginatorIdentifierOrKeyAsn.xml.cs (1)
123decoded.SubjectKeyIdentifier = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\OriginatorInfoAsn.xml.cs (1)
144tmpItem = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\OriginatorPublicKeyAsn.xml.cs (1)
81decoded.PublicKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\OtherKeyAttributeAsn.xml.cs (1)
101decoded.KeyAttr = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\PkiStatusInfo.xml.cs (1)
115decoded.StatusString = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\PolicyQualifierInfo.xml.cs (1)
93decoded.Qualifier = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\RecipientEncryptedKeyAsn.xml.cs (1)
81decoded.EncryptedKey = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\RecipientIdentifierAsn.xml.cs (1)
112decoded.SubjectKeyIdentifier = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\RecipientKeyIdentifier.xml.cs (1)
92decoded.SubjectKeyIdentifier = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampReq.xml.cs (1)
160decoded.Nonce = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampResp.xml.cs (1)
94decoded.TimeStampToken = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TstInfo.xml.cs (2)
168decoded.SerialNumber = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray(); 194decoded.Nonce = rebindSpan.Overlaps(tmpSpan, out offset) ? rebind.Slice(offset, tmpSpan.Length) : tmpSpan.ToArray();
System\Security\Cryptography\Pkcs\SignedCms.cs (1)
442return content.Slice(contentOffset, contentLength);
System.Text.Json (10)
System\Text\Json\Document\JsonDocument.cs (8)
237return _utf8Json.Slice(row.Location - 1, row.SizeOrLength + 2); 240return _utf8Json.Slice(row.Location, row.SizeOrLength); 246return _utf8Json.Slice(start, row.Location - start + row.SizeOrLength); 273return _utf8Json.Slice(start, end - start); 279return _utf8Json.Slice(start, end - start); 751writer.WriteNumberValue(_utf8Json.Slice(row.Location, row.SizeOrLength).Span); 782writer.WriteNumberValue(_utf8Json.Slice(row.Location, row.SizeOrLength).Span); 819ReadOnlySpan<byte> text = _utf8Json.Slice(loc, length).Span;
System\Text\Json\Document\JsonDocument.PropertyNameSet.cs (2)
76ReadOnlyMemory<byte> propertyName = utf8Json.Slice(dbRow.Location, dbRow.SizeOrLength); 124ReadOnlyMemory<byte> propertyName = utf8Json.Slice(range.Start, range.Length);
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\RegexReplacement.cs (3)
304state.segments.Add(state.inputMemory.Slice(state.prevat, match.Index - state.prevat)); 324state.segments.Add(state.inputMemory.Slice(match.Index + match.Length, state.prevat - match.Index - match.Length)); 336state.segments.Add(state.inputMemory.Slice(0, state.prevat));