using System.Diagnostics;
using System.Runtime.InteropServices;
-namespace System.Net.Http
+namespace System.Net
{
// Warning: Mutable struct!
// The purpose of this struct is to simplify buffer management.
public int ActiveLength => _availableStart - _activeStart;
public Span<byte> ActiveSpan => new Span<byte>(_bytes, _activeStart, _availableStart - _activeStart);
+ public ReadOnlySpan<byte> ActiveReadOnlySpan => new ReadOnlySpan<byte>(_bytes, _activeStart, _availableStart - _activeStart);
public int AvailableLength => _bytes.Length - _availableStart;
public Span<byte> AvailableSpan => new Span<byte>(_bytes, _availableStart, AvailableLength);
public Memory<byte> ActiveMemory => new Memory<byte>(_bytes, _activeStart, _availableStart - _activeStart);
<Compile Include="$(CommonPath)System\Text\SimpleRegex.cs">
<Link>Common\System\Text\SimpleRegex.cs</Link>
</Compile>
+ <Compile Include="$(CommonPath)System\Net\ArrayBuffer.cs">
+ <Link>Common\System\Net\ArrayBuffer.cs</Link>
+ </Compile>
</ItemGroup>
<!-- SocketsHttpHandler implementation -->
<ItemGroup>
- <Compile Include="System\Net\Http\SocketsHttpHandler\ArrayBuffer.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs" />
<Reference Include="System.Security.Cryptography.OpenSsl" />
<Reference Include="System.Security.Cryptography.Primitives" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
<Compile Include="$(CommonPath)System\IO\StreamHelpers.CopyValidation.cs">
<Link>ProductionCode\Common\System\IO\StreamHelpers.CopyValidation.cs</Link>
</Compile>
+ <Compile Include="$(CommonPath)System\Net\ArrayBuffer.cs">
+ <Link>Common\System\Net\ArrayBuffer.cs</Link>
+ </Compile>
<Compile Include="$(CommonPath)System\Net\InternalException.cs">
<Link>ProductionCode\Common\System\Net\InternalException.cs</Link>
</Compile>
<Compile Include="..\..\src\System\Net\Http\StringContent.cs">
<Link>ProductionCode\System\Net\Http\StringContent.cs</Link>
</Compile>
- <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\ArrayBuffer.cs">
- <Link>ProductionCode\System\Net\Http\SocketsHttpHandler\ArrayBuffer.cs</Link>
- </Compile>
<Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs">
<Link>ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs</Link>
</Compile>
<Link>WinHttpHandler\UnitTests\TestServer.cs</Link>
</Compile>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>