114 references to ReadOnlySpan
GenerateDocumentationAndConfigFiles (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Metrics (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Metrics.Legacy (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (15)
HttpUtilitiesTest.cs (2)
36var block = new ReadOnlySpan<byte>(Encoding.ASCII.GetBytes(input)); 66var block = new ReadOnlySpan<byte>(Encoding.ASCII.GetBytes(input));
KnownStringsTests.cs (1)
78var data = new ReadOnlySpan<byte>(methodData);
src\Shared\test\Shared.Tests\runtime\Http2\HuffmanDecodingTests.cs (5)
250Assert.Equal(expected.Length, Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst)); 271Exception exception = Assert.Throws<HuffmanDecodingException>(() => Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst)); 288Exception exception = Assert.Throws<HuffmanDecodingException>(() => Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst)); 299int decodedCount = Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref actualDestination); 333Exception exception = Assert.Throws<HuffmanDecodingException>(() => Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst));
src\Shared\test\Shared.Tests\runtime\Http3\VariableLengthIntegerHelperTests.cs (7)
28ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 43ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 59ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 74ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 92ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 107ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>( 124ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[]
Microsoft.AspNetCore.Shared.Tests (12)
runtime\Http2\HuffmanDecodingTests.cs (5)
250Assert.Equal(expected.Length, Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst)); 271Exception exception = Assert.Throws<HuffmanDecodingException>(() => Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst)); 288Exception exception = Assert.Throws<HuffmanDecodingException>(() => Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst)); 299int decodedCount = Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref actualDestination); 333Exception exception = Assert.Throws<HuffmanDecodingException>(() => Huffman.Decode(new ReadOnlySpan<byte>(encoded), ref dst));
runtime\Http3\VariableLengthIntegerHelperTests.cs (7)
28ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 43ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 59ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 74ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 92ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[] 107ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>( 124ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(new byte[]
Microsoft.AspNetCore.WebUtilities.Tests (3)
HttpResponseStreamWriterTest.cs (3)
266var span = new ReadOnlySpan<char>(array); 300var span = new ReadOnlySpan<char>(array); 870httpResponseStreamWriter.Write(new ReadOnlySpan<char>(new char[] { 'a', 'b' }));
Microsoft.CodeAnalysis (2)
Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.Analyzers (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Microsoft.ML.Tests (2)
Scenarios\Api\TestApi.cs (2)
281var span = new ReadOnlySpan<char>(parts[0].ToCharArray()); 285span = new ReadOnlySpan<char>(parts[j + 1].ToCharArray());
Roslyn.Diagnostics.Analyzers (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableArray_1.cs (2)
99public ReadOnlySpan<T> AsSpan() => new ReadOnlySpan<T>(array); 1025return self.RemoveRange(new ReadOnlySpan<T>(items), equalityComparer);
System.IO.Hashing (9)
System\IO\Hashing\Crc32.cs (1)
108return Hash(new ReadOnlySpan<byte>(source));
System\IO\Hashing\Crc64.cs (1)
106return Hash(new ReadOnlySpan<byte>(source));
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (1)
89Append(new ReadOnlySpan<byte>(source));
System\IO\Hashing\XxHash128.cs (1)
66return Hash(new ReadOnlySpan<byte>(source), seed);
System\IO\Hashing\XxHash3.cs (1)
65return Hash(new ReadOnlySpan<byte>(source), seed);
System\IO\Hashing\XxHash32.cs (2)
166return Hash(new ReadOnlySpan<byte>(source)); 182return Hash(new ReadOnlySpan<byte>(source), seed);
System\IO\Hashing\XxHash64.cs (2)
166return Hash(new ReadOnlySpan<byte>(source)); 182return Hash(new ReadOnlySpan<byte>(source), seed);
System.Private.CoreLib (25)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (4)
2317return ToBase64String(new ReadOnlySpan<byte>(inArray), Base64FormattingOptions.None); 2324return ToBase64String(new ReadOnlySpan<byte>(inArray), options); 3047return ToHexString(new ReadOnlySpan<byte>(inArray)); 3124return ToHexStringLower(new ReadOnlySpan<byte>(inArray));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
240return new ReadOnlySpan<string>(names).ToArray();
src\libraries\System.Private.CoreLib\src\System\Globalization\SortKey.cs (2)
59return new ReadOnlySpan<byte>(key1Data).SequenceCompareTo(key2Data); 63value is SortKey other && new ReadOnlySpan<byte>(_keyData).SequenceEqual(other._keyData);
src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
60this(new ReadOnlySpan<byte>(b ?? throw new ArgumentNullException(nameof(b))))
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (2)
740WriteAllBytes(path, new ReadOnlySpan<byte>(bytes)); 789AppendAllBytes(path, new ReadOnlySpan<byte>(bytes));
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (1)
3924new ReadOnlySpan<T>(source).CopyTo(destination);
src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
310return GetItems(new ReadOnlySpan<T>(choices), length);
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
205public static implicit operator ReadOnlySpan<T>(T[]? array) => new ReadOnlySpan<T>(array);
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyNameHelpers.StrongName.cs (1)
47ReadOnlySpan<byte> publicKeyBlob = new ReadOnlySpan<byte>(publicKey);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
194return new ReadOnlySpan<T>(_managedValues!);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
124return new ReadOnlySpan<string>(ret).ToArray();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (4)
726return JoinCore(new ReadOnlySpan<char>(in separator), new ReadOnlySpan<string?>(value)); 751return JoinCore(separator.AsSpan(), new ReadOnlySpan<string?>(value)); 794return JoinCore(separator.AsSpan(), new ReadOnlySpan<string?>(valuesArray)); 932return JoinCore(separator, new ReadOnlySpan<string?>(valuesArray));
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (1)
1740GetType() != typeof(UnicodeEncoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UnicodeEncoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (1)
1132GetType() != typeof(UTF32Encoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UTF32Encoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
873GetType() != typeof(UTF8Encoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UTF8Encoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
294return WaitMultiple(new ReadOnlySpan<WaitHandle>(waitHandles), waitAll, millisecondsTimeout);
src\System\RuntimeType.CoreCLR.cs (1)
2670return new ReadOnlySpan<Type>(candidates).ToArray();
System.Reflection.Metadata (1)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
215return GetOrAddBlob(new ReadOnlySpan<byte>(value));
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
272this(new ReadOnlySpan<byte>(value ?? throw new ArgumentNullException(nameof(value))))
System.Security.Cryptography.Cose (4)
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
562return VerifyDetached(key, new ReadOnlySpan<byte>(detachedContent), new ReadOnlySpan<byte>(associatedData));
System\Security\Cryptography\Cose\CoseSignature.cs (2)
278return VerifyDetached(key, new ReadOnlySpan<byte>(detachedContent), new ReadOnlySpan<byte>(associatedData));
System.Security.Cryptography.Pkcs (6)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
34new ReadOnlySpan<byte>(passwordBytes),
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (2)
122new ReadOnlySpan<byte>(passwordBytes), 185Decrypt(new ReadOnlySpan<byte>(passwordBytes));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
27: this(new ReadOnlySpan<byte>(keyId))
System\Security\Cryptography\Pkcs\EnvelopedCms.cs (1)
127Decode(new ReadOnlySpan<byte>(encodedMessage));
System\Security\Cryptography\Pkcs\SignedCms.cs (1)
160Decode(new ReadOnlySpan<byte>(encodedMessage));
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\Symbolic\BitVector.cs (4)
191MemoryExtensions.SequenceEqual(new ReadOnlySpan<ulong>(_blocks), new ReadOnlySpan<ulong>(other._blocks)); 195MemoryExtensions.SequenceCompareTo(new ReadOnlySpan<ulong>(_blocks), new ReadOnlySpan<ulong>(other._blocks));
Test.Utilities (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);
Text.Analyzers (2)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
96Append(new ReadOnlySpan<byte>(source));
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
70return Hash(new ReadOnlySpan<byte>(source), seed);