1299 references to Slice
http2cat (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
IIS.FunctionalTests (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
IIS.LongTests (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
IIS.NewHandler.FunctionalTests (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
IIS.NewShim.FunctionalTests (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
IISExpress.FunctionalTests (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
InMemory.FunctionalTests (15)
Http2\Http2TestBase.cs (13)
633var extendedHeader = buffer.Slice(0, extendedHeaderLength);
635var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
638var padding = buffer.Slice(extendedHeaderLength + length, padLength);
649writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
675var extendedHeader = buffer.Slice(0, extendedHeaderLength);
690writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
721var extendedHeader = buffer.Slice(0, extendedHeaderLength);
725var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
728var padding = buffer.Slice(extendedHeaderLength + length, padLength);
739writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
850await SendAsync(buffer.Span.Slice(0, length));
920await SendAsync(buffer.Span.Slice(0, length));
948await SendAsync(buffer.Span.Slice(0, length));
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Forms (4)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (2)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Web (4)
Microsoft.AspNetCore.DataProtection.Abstractions (1)
Microsoft.AspNetCore.Http.Abstractions (6)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.Http.Extensions (16)
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (13)
93string s = _chars.Slice(0, _pos).ToString();
112return _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
117public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
121if (_chars.Slice(0, _pos).TryCopyTo(destination))
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
144_chars.Slice(index, count).Fill(value);
163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
222Span<char> dst = _chars.Slice(_pos, count);
238Span<char> dst = _chars.Slice(_pos, length);
268return _chars.Slice(origPos, length);
295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.HttpLogging (14)
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (13)
93string s = _chars.Slice(0, _pos).ToString();
112return _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
117public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
121if (_chars.Slice(0, _pos).TryCopyTo(destination))
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
144_chars.Slice(index, count).Fill(value);
163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
222Span<char> dst = _chars.Slice(_pos, count);
238Span<char> dst = _chars.Slice(_pos, length);
268return _chars.Slice(origPos, length);
295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Routing.Tests (8)
Matching\DfaMatcherTest.cs (8)
372var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
399var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
426var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
453var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
478var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
504var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
531var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
558var set = matcher.FindCandidateSet(context, path, buffer.AsSpan().Slice(0, count));
Microsoft.AspNetCore.Server.HttpSys (3)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (18)
src\Shared\Http2cat\Http2Utilities.cs (15)
197writableBuffer.Write(buffer.Slice(0, length));
212writableBuffer.Write(buffer.Slice(0, length));
283var extendedHeader = buffer.Slice(0, extendedHeaderLength);
285var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
288var padding = buffer.Slice(extendedHeaderLength + length, padLength);
299writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
323var extendedHeader = buffer.Slice(0, extendedHeaderLength);
338writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
367var extendedHeader = buffer.Slice(0, extendedHeaderLength);
371var payload = buffer.Slice(extendedHeaderLength, buffer.Length - padLength - extendedHeaderLength);
374var padding = buffer.Slice(extendedHeaderLength + length, padLength);
385writableBuffer.Write(buffer.Slice(0, frame.PayloadLength));
503await SendAsync(buffer.Span.Slice(0, length));
568await SendAsync(buffer.Span.Slice(0, length));
596await SendAsync(buffer.Span.Slice(0, length));
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (5)
Microsoft.AspNetCore.Server.IIS (3)
Microsoft.AspNetCore.Server.Kestrel.Core (29)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (33)
Http2\Http2HPackEncoderTests.cs (16)
34var result = buffer.Slice(0, length).ToArray();
57var result = buffer.Slice(5, length - 5).ToArray();
86var result = buffer.Slice(0, length).ToArray();
128result = buffer.Slice(0, length).ToArray();
169result = buffer.Slice(0, length).ToArray();
230var result = buffer.Slice(0, length).ToArray();
272result = buffer.Slice(0, length).ToArray();
313result = buffer.Slice(0, length).ToArray();
551Assert.False(HPackHeaderWriter.BeginEncodeHeaders(statusCode, hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out var length));
553Assert.Equal(expectedStatusCodePayload, payload.Slice(0, length).ToArray());
558Assert.False(HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length));
560Assert.Equal(expectedDateHeaderPayload, payload.Slice(offset, length).ToArray());
565Assert.False(HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length));
567Assert.Equal(expectedContentTypeHeaderPayload, payload.Slice(offset, length).ToArray());
572Assert.True(HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length));
574Assert.Equal(expectedServerHeaderPayload, payload.Slice(offset, length).ToArray());
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.Shared.Tests (16)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.WebSockets (14)
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (13)
93string s = _chars.Slice(0, _pos).ToString();
112return _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
117public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
121if (_chars.Slice(0, _pos).TryCopyTo(destination))
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
144_chars.Slice(index, count).Fill(value);
163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
222Span<char> dst = _chars.Slice(_pos, count);
238Span<char> dst = _chars.Slice(_pos, length);
268return _chars.Slice(origPos, length);
295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.WebUtilities (9)
Microsoft.Build (4)
Microsoft.Build.Engine.OM.UnitTests (2)
Microsoft.Build.Framework (8)
ArraySortHelper.cs (8)
758InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
764HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
769int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
772IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
999InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1005HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1010int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1013IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.Build.Tasks.Core (2)
Microsoft.Build.Utilities.Core (2)
Microsoft.Extensions.DependencyInjection.Abstractions (3)
Microsoft.Extensions.Logging.Abstractions (13)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.Extensions.Logging.Console (1)
Microsoft.Net.Http.Headers (1)
Microsoft.NET.Sdk.WebAssembly.Pack.Tasks (1)
MSBuild (2)
System.Collections (1)
System.Collections.Immutable (1)
System.Collections.Specialized (1)
System.Console (21)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Diagnostics.DiagnosticSource (14)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Diagnostics.FileVersionInfo (1)
System.Diagnostics.Process (20)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Diagnostics.TextWriterTraceListener (3)
System.Formats.Asn1 (18)
System.Formats.Cbor (5)
System.Formats.Tar (61)
System.IO.Compression (4)
System.IO.Compression.Brotli (2)
System.IO.FileSystem.Watcher (13)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.IO.Hashing (4)
System.IO.MemoryMappedFiles (1)
System.Linq (1)
System.Memory (2)
System.Net.Http (44)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (7)
434string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.ActiveLength)));
658GetFrameData(_incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength), frameHeader.PaddedFlag, frameHeader.PriorityFlag),
674_incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength),
742ReadOnlySpan<byte> span = _incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength);
775ReadOnlySpan<byte> frameData = GetFrameData(_incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength), hasPad: frameHeader.PaddedFlag, hasPriority: false);
829ReadOnlySpan<byte> settings = _incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength);
983ReadOnlySpan<byte> pingContent = _incomingBuffer.ActiveSpan.Slice(0, FrameHeader.PingLength);
System.Net.HttpListener (1)
System.Net.Mail (13)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Net.Ping (2)
System.Net.Primitives (4)
System.Net.Quic (1)
System.Net.Security (21)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (14)
404Span<byte> blob = payload.Slice(payloadOffset, sizeof(NtChallengeResponse) + serverInfo.Length);
405ref NtChallengeResponse temp = ref MemoryMarshal.AsRef<NtChallengeResponse>(blob.Slice(0, sizeof(NtChallengeResponse)));
621ref AuthenticateMessage response = ref MemoryMarshal.AsRef<AuthenticateMessage>(responseAsSpan.Slice(0, sizeof(AuthenticateMessage)));
644payload.Slice(payloadOffset, ChallengeResponseLength).Clear();
665int sessionKeyWritten = HMACMD5.HashData(ntlm2hash, responseAsSpan.Slice(response.NtChallengeResponse.PayloadOffset, 16), sessionBaseKey);
671Span<byte> encryptedRandomSessionKey = payload.Slice(payloadOffset, 16);
724hmac.AppendData(signature.Slice(12, 4));
728seal.Transform(hmacResult.Slice(0, 8), signature.Slice(4, 8));
770_clientSeal.Transform(input, output.Slice(SignatureLength, input.Length));
771CalculateSignature(input, _clientSequenceNumber, _clientSigningKey, _clientSeal, output.Slice(0, SignatureLength));
795_serverSeal.Transform(input.Slice(SignatureLength), output.Slice(0, input.Length - SignatureLength));
796if (!VerifyMIC(output.Slice(0, input.Length - SignatureLength), input.Slice(0, SignatureLength)))
824if (!VerifyMIC(input.Slice(SignatureLength), input.Slice(0, SignatureLength)))
System.Net.Sockets (13)
System\Net\Sockets\Socket.cs (11)
159new IPAddress((long)SocketAddressPal.GetIPv4Address(buffer.Slice(0, bufferLength)) & 0x0FFFFFFFF),
165SocketAddressPal.GetIPv6Address(buffer.Slice(0, bufferLength), address, out uint scope);
172_rightEndPoint = new UnixDomainSocketEndPoint(buffer.Slice(0, bufferLength));
191new IPAddress((long)SocketAddressPal.GetIPv4Address(buffer.Slice(0, bufferLength)) & 0x0FFFFFFFF),
197SocketAddressPal.GetIPv6Address(buffer.Slice(0, bufferLength), address, out uint scope);
204_remoteEndPoint = new UnixDomainSocketEndPoint(buffer.Slice(0, bufferLength));
319_localEndPoint = IPEndPointExtensions.CreateIPEndPoint(buffer.Slice(0, size));
324buffer.Slice(0, size).CopyTo(socketAddress.Buffer.Span);
365_remoteEndPoint = IPEndPointExtensions.CreateIPEndPoint(buffer.Slice(0, size));
370buffer.Slice(0, size).CopyTo(socketAddress.Buffer.Span);
781socketAddress.Buffer.Span.Slice(0, socketAddress.Size));
System.Net.WebProxy (1)
System.Net.WebSockets (10)
System\Net\WebSockets\ManagedWebSocket.cs (8)
833_receiveBuffer.Span.Slice(_receiveBufferOffset, receiveBufferBytesToCopy).CopyTo(
858_inflater!.Span.Slice(0, totalBytesReceived) :
859payloadBuffer.Span.Slice(0, totalBytesReceived), header.Mask, _receivedMaskOffsetOffset);
884!TryValidateUtf8(payloadBuffer.Span.Slice(0, totalBytesReceived), header.EndOfMessage, _utf8TextState))
976ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0);
989closeStatusDescription = s_textEncoding.GetString(_receiveBuffer.Span.Slice(_receiveBufferOffset + 2, (int)header.PayloadLength - 2));
1054ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0);
1418_receiveBuffer.Span.Slice(_receiveBufferOffset, _receiveBufferCount).CopyTo(_receiveBuffer.Span);
System.Net.WebSockets.Client (2)
System.Private.CoreLib (136)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (18)
160InsertionSort(keys.Slice(0, partitionSize), comparer);
166HeapSort(keys.Slice(0, partitionSize), comparer);
171int p = PickPivotAndPartition(keys.Slice(0, partitionSize), comparer);
439InsertionSort(keys.Slice(0, partitionSize));
445HeapSort(keys.Slice(0, partitionSize));
450int p = PickPivotAndPartition(keys.Slice(0, partitionSize));
705InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
711HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
716int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
934InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
940HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
945int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.cs (6)
78return span.Slice(start, length);
95=> span.Slice(0, ClampEnd(span, 0, trimElement));
346return span.Slice(start, length);
390return span.Slice(0, ClampEnd(span, 0, trimElements));
817return span.Slice(start, end - start + 1);
833=> span.Slice(0, ClampEnd(span, 0));
src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (4)
234combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
265if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount))
290combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
333if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount)
System.Private.CoreLib.Generators (5)
System.Private.Uri (20)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Private.Xml (17)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Reflection.Metadata (14)
System.Runtime.Numerics (148)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System\Number.BigInteger.cs (10)
438Span<uint> newBuffer = MemoryMarshal.Cast<int, uint>(arrayFromPoolForResultBuffer).Slice(0, bufferSize);
490Span<uint> multiplier = MemoryMarshal.Cast<int, uint>(arrayFromPoolForMultiplier).Slice(0, blockSize);
514BigIntegerCalculator.Multiply(multiplier, curBuffer.Slice(blockSize, upperLen), curNewBuffer.Slice(0, len));
552Span<uint> newMultiplier = MemoryMarshal.Cast<int, uint>(arrayFromPoolForMultiplier).Slice(0, blockSize);
573currentBuffer = buffer.Slice(0, currentBufferSize);
617bits = currentBuffer.Slice(0, currentBufferSize).ToArray();
626Span<uint> curBits = currentBuffer.Slice(0, currentBufferSize);
674bits = bits.Slice(0, bytesWrittenOrNeeded);
755bytes = bytes.Slice(0, bytesWrittenOrNeeded);
System\Numerics\BigInteger.cs (52)
574value = value.Slice(0, dwordCount);
607_bits = value.Slice(0, len).ToArray();
769: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
799: remainderFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
805: quotientFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
922: bitsFromPool = ArrayPool<uint>.Shared.Rent(leftBits.Length)).Slice(0, leftBits.Length);
935: bitsFromPool = ArrayPool<uint>.Shared.Rent(leftBits.Length)).Slice(0, leftBits.Length);
990: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1050: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1061: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1519buffer = buffer.Slice(0, _bits.Length + 1);
1522NumericsHelpers.DangerousMakeTwosComplement(buffer.Slice(0, buffer.Length - 1)); // Mutates dwords
1543buffer = buffer.Slice(0, count);
1651: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1663: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1675: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1687: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1729: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1741: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1751: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
1763: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2340: leftBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2341x = x.Slice(0, left.WriteTo(x));
2347: rightBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2348y = y.Slice(0, right.WriteTo(y));
2354: resultBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2396: leftBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2397x = x.Slice(0, left.WriteTo(x));
2403: rightBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2404y = y.Slice(0, right.WriteTo(y));
2410: resultBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2447: leftBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2448x = x.Slice(0, left.WriteTo(x));
2454: rightBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2455y = y.Slice(0, right.WriteTo(y));
2461: resultBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2501: xdFromPool = ArrayPool<uint>.Shared.Rent(xl)).Slice(0, xl);
2508: zdFromPool = ArrayPool<uint>.Shared.Rent(zl)).Slice(0, zl);
2562: xdFromPool = ArrayPool<uint>.Shared.Rent(xl)).Slice(0, xl);
2590: zdFromPool = ArrayPool<uint>.Shared.Rent(zl)).Slice(0, zl);
2704: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2716: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2726: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2738: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2751: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2793: quotientFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2819: quotientFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
2869: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
3254xd = xd.Slice(0, xl);
3264zd = zd.Slice(0, zl);
3389xd = xd.Slice(0, xl);
3399zd = zd.Slice(0, zl);
System\Numerics\BigIntegerCalculator.FastReducer.cs (9)
41_mu = mu.Slice(0, ActualLength(mu));
58int l2 = DivMul(_q1.Slice(0, l1), _modulus, _q2, _modulus.Length + 1);
61var length = SubMod(value, _q2.Slice(0, l2), _modulus, _modulus.Length + 1);
87bits.Slice(0, left.Length + right.Length));
93bits.Slice(0, left.Length + right.Length));
96return ActualLength(bits.Slice(0, left.Length + right.Length));
110left = left.Slice(0, k);
115left = left.Slice(0, ActualLength(left));
120left = left.Slice(0, ActualLength(left));
System\Numerics\BigIntegerCalculator.GcdInv.cs (6)
69: rightCopyFromPool = ArrayPool<uint>.Shared.Rent(right.Length)).Slice(0, right.Length);
159left = left.Slice(0, Reduce(left, right));
169left = left.Slice(0, Refresh(left, count));
170right = right.Slice(0, Refresh(right, count));
196left = left.Slice(0, Overwrite(left, Gcd(x, y)));
314return ActualLength(bits.Slice(0, maxLength));
System\Numerics\BigIntegerCalculator.PowMod.cs (38)
28: tempFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length);
34: valueCopyFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length);
61resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
67return result.Slice(0, resultLength);
78Multiply(left.Slice(0, leftLength), right, temp.Slice(0, resultLength));
82Multiply(right, left.Slice(0, leftLength), temp.Slice(0, resultLength));
90return ActualLength(left.Slice(0, resultLength));
100Square(value.Slice(0, valueLength), temp.Slice(0, resultLength));
107return ActualLength(value.Slice(0, resultLength));
221: valueCopyFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
240: tempFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length);
270: valueCopyFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
289: tempFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length);
328: rFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
335: muFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
342: q1FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
348: q2FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
388: rFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
395: muFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
402: q1FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
408: q2FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
447resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
448resultLength = Reduce(result.Slice(0, resultLength), modulus);
451valueLength = Reduce(value.Slice(0, valueLength), modulus);
474resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
475resultLength = Reduce(result.Slice(0, resultLength), modulus);
480valueLength = Reduce(value.Slice(0, valueLength), modulus);
485return result.Slice(0, resultLength);
506resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
507resultLength = reducer.Reduce(result.Slice(0, resultLength));
510valueLength = reducer.Reduce(value.Slice(0, valueLength));
533resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
534resultLength = reducer.Reduce(result.Slice(0, resultLength));
539valueLength = reducer.Reduce(value.Slice(0, valueLength));
544return result.Slice(0, resultLength);
System\Numerics\BigIntegerCalculator.SquMul.cs (13)
89Span<uint> bitsLow = bits.Slice(0, n2);
102: foldFromPool = ArrayPool<uint>.Shared.Rent(foldLength)).Slice(0, foldLength);
109: coreFromPool = ArrayPool<uint>.Shared.Rent(coreLength)).Slice(0, coreLength);
217Span<uint> bitsLow = bits.Slice(0, n + right.Length);
227: carryFromPool = ArrayPool<uint>.Shared.Rent(carryLength)).Slice(0, carryLength);
229Span<uint> carryOrig = bits.Slice(n, right.Length);
235MultiplyKaratsuba(right, leftHigh, bitsHigh.Slice(0, leftHigh.Length + right.Length), (right.Length + 1) >> 1);
237Multiply(leftHigh, right, bitsHigh.Slice(0, leftHigh.Length + right.Length));
269Span<uint> bitsLow = bits.Slice(0, n + n);
286: leftFoldFromPool = ArrayPool<uint>.Shared.Rent(foldLength)).Slice(0, foldLength);
292: rightFoldFromPool = ArrayPool<uint>.Shared.Rent(foldLength)).Slice(0, foldLength);
305: coreFromPool = ArrayPool<uint>.Shared.Rent(coreLength)).Slice(0, coreLength);
323AddSelf(bits.Slice(n), core.Slice(0, ActualLength(core)));
System.Security.Cryptography (106)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (10)
192buf = buf.Slice(0, byteCount);
202buf = buf.Slice(0, written);
482buf = buf.Slice(0, byteCount);
492buf = buf.Slice(0, written);
667iv = iv.Slice(0, rc2Parameters.Iv.Length);
716iv = iv.Slice(0, bytesWritten);
848Span<byte> k = dk.Slice(0, 8);
849Span<byte> iv = dk.Slice(8, 8);
1004t = t.Slice(0, tLength);
1019t.Slice(0, dk.Length).CopyTo(dk);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (12)
135Span<byte> ps = destination.Slice(2, destination.Length - source.Length - 3);
282destination.Slice(2, paddingLength).Fill(0xFF);
316Span<byte> seed = destination.Slice(1, hLen);
324Span<byte> lHash = db.Slice(0, hLen);
326Span<byte> ps = db.Slice(hLen, db.Length - hLen - 1 - mDest.Length);
327Span<byte> psEnd = db.Slice(hLen + ps.Length, 1);
409destination.Slice(0, destination.Length - emLen).Clear();
412Span<byte> em = destination.Slice(destination.Length - emLen, emLen);
416Span<byte> db = em.Slice(0, dbLen);
417Span<byte> hDest = em.Slice(dbLen, hLen);
446db.Slice(0, psLen).Clear();
620tmp.Slice(0, writePtr.Length).CopyTo(writePtr);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System\Security\Cryptography\UniversalCryptoOneShot.cs (11)
32Span<byte> transformBuffer = output.Slice(0, bytesTransformed);
80stackBuffer.Slice(0, stackTransformFinal),
83Span<byte> writtenDepadded = stackBuffer.Slice(0, depaddedLength);
131stackBuffer.Slice(0, finalTransformWritten),
134Span<byte> depaddedFinalTransform = stackBuffer.Slice(0, depaddedLength);
139CryptographicOperations.ZeroMemory(output.Slice(0, writtenToOutput));
151CryptographicOperations.ZeroMemory(output.Slice(0, writtenToOutput));
152CryptographicOperations.ZeroMemory(stackBuffer.Slice(0, finalTransformWritten));
169decryptedBuffer = buffer.Slice(0, transformWritten);
183decryptedBuffer.Slice(0, unpaddedLength).CopyTo(output);
218Span<byte> paddedOutput = output.Slice(0, padWritten);
System.Security.Cryptography.Cose (8)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (4)
391WriteCoseSignaturesArray(writer, signer, buffer.Slice(protectedMapBytesWritten), buffer.Slice(0, protectedMapBytesWritten), associatedData, content, contentStream);
463AppendToBeSigned(buffer, hasher, SigStructureContext.Signature, bodyProtected, buffer.Slice(0, signProtectedBytesWritten), associatedData, content, contentStream);
799byte[] encodedSignProtected = bufferSpan.Slice(0, bytesWritten).ToArray();
806byte[] signature = bufferSpan.Slice(0, bytesWritten).ToArray();
System.Text.Encodings.Web (17)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.Json (120)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.Json.SourceGeneration (3)
System.Text.RegularExpressions (24)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.RegularExpressions.Generator (27)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (13)
92string s = _chars.Slice(0, _pos).ToString();
111return _chars.Slice(0, _pos);
114public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
116public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
120if (_chars.Slice(0, _pos).TryCopyTo(destination))
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
143_chars.Slice(index, count).Fill(value);
162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
230Span<char> dst = _chars.Slice(_pos, count);
246Span<char> dst = _chars.Slice(_pos, length);
276return _chars.Slice(origPos, length);
312_chars.Slice(0, _pos).CopyTo(poolArray);