Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Move Binary APIs from Buffers.dll to Memory.dll.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsonkhan committed Oct 11, 2017
1 parent 49f94b8 commit d612683
Show file tree
Hide file tree
Showing 22 changed files with 229 additions and 343 deletions.
10 changes: 0 additions & 10 deletions src/System.Buffers/System.Buffers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E89
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Buffers.Performance.Tests", "tests\Performance\System.Buffers.Performance.Tests.csproj", "{8C1FA65F-4AE7-4627-8C2B-DE5EDF779DB5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -40,10 +38,6 @@ Global
{11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
{11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
{11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
{8C1FA65F-4AE7-4627-8C2B-DE5EDF779DB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C1FA65F-4AE7-4627-8C2B-DE5EDF779DB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C1FA65F-4AE7-4627-8C2B-DE5EDF779DB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C1FA65F-4AE7-4627-8C2B-DE5EDF779DB5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -52,9 +46,5 @@ Global
{62E2AD5F-C8D0-45FB-B6A5-AED2C77F198C} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
{2ADDB484-6F57-4D71-A3FE-A57EC6329A2B} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
{11AE73F7-3532-47B9-8FF6-B4F22D76456C} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
{8C1FA65F-4AE7-4627-8C2B-DE5EDF779DB5} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B1D0CB97-AED2-48E3-A49C-7C8CD75D3FE6}
EndGlobalSection
EndGlobal
80 changes: 1 addition & 79 deletions src/System.Buffers/ref/System.Buffers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,82 +15,4 @@ public abstract class ArrayPool<T>
public abstract T[] Rent(int minimumLength);
public abstract void Return(T[] array, bool clearArray = false);
}
}

namespace System.Buffers.Binary
{
[System.CLSCompliantAttribute(false)]
public static class BinaryPrimitives
{
public static sbyte ReverseEndianness(sbyte value) { throw null; }
public static byte ReverseEndianness(byte value) { throw null; }
public static short ReverseEndianness(short value) { throw null; }
public static ushort ReverseEndianness(ushort value) { throw null; }
public static int ReverseEndianness(int value) { throw null; }
public static uint ReverseEndianness(uint value) { throw null; }
public static long ReverseEndianness(long value) { throw null; }
public static ulong ReverseEndianness(ulong value) { throw null; }

public static T ReadMachineEndian<T>(ReadOnlySpan<byte> buffer) where T : struct { throw null; }
public static bool TryReadMachineEndian<T>(ReadOnlySpan<byte> buffer, out T value) where T : struct { throw null; }

public static short ReadInt16LittleEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static int ReadInt32LittleEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static long ReadInt64LittleEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static ushort ReadUInt16LittleEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static uint ReadUInt32LittleEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static ulong ReadUInt64LittleEndian(ReadOnlySpan<byte> buffer) { throw null; }

public static bool TryReadInt16LittleEndian(ReadOnlySpan<byte> buffer, out short value) { throw null; }
public static bool TryReadInt32LittleEndian(ReadOnlySpan<byte> buffer, out int value) { throw null; }
public static bool TryReadInt64LittleEndian(ReadOnlySpan<byte> buffer, out long value) { throw null; }
public static bool TryReadUInt16LittleEndian(ReadOnlySpan<byte> buffer, out ushort value) { throw null; }
public static bool TryReadUInt32LittleEndian(ReadOnlySpan<byte> buffer, out uint value) { throw null; }
public static bool TryReadUInt64LittleEndian(ReadOnlySpan<byte> buffer, out ulong value) { throw null; }

public static short ReadInt16BigEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static int ReadInt32BigEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static long ReadInt64BigEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static ushort ReadUInt16BigEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static uint ReadUInt32BigEndian(ReadOnlySpan<byte> buffer) { throw null; }
public static ulong ReadUInt64BigEndian(ReadOnlySpan<byte> buffer) { throw null; }

public static bool TryReadInt16BigEndian(ReadOnlySpan<byte> buffer, out short value) { throw null; }
public static bool TryReadInt32BigEndian(ReadOnlySpan<byte> buffer, out int value) { throw null; }
public static bool TryReadInt64BigEndian(ReadOnlySpan<byte> buffer, out long value) { throw null; }
public static bool TryReadUInt16BigEndian(ReadOnlySpan<byte> buffer, out ushort value) { throw null; }
public static bool TryReadUInt32BigEndian(ReadOnlySpan<byte> buffer, out uint value) { throw null; }
public static bool TryReadUInt64BigEndian(ReadOnlySpan<byte> buffer, out ulong value) { throw null; }

public static void WriteMachineEndian<T>(ref Span<byte> buffer, T value) where T : struct { throw null; }
public static bool TryWriteMachineEndian<T>(ref Span<byte> buffer, T value) where T : struct { throw null; }

public static void WriteInt16LittleEndian(Span<byte> buffer, short value) { throw null; }
public static void WriteInt32LittleEndian(Span<byte> buffer, int value) { throw null; }
public static void WriteInt64LittleEndian(Span<byte> buffer, long value) { throw null; }
public static void WriteUInt16LittleEndian(Span<byte> buffer, ushort value) { throw null; }
public static void WriteUInt32LittleEndian(Span<byte> buffer, uint value) { throw null; }
public static void WriteUInt64LittleEndian(Span<byte> buffer, ulong value) { throw null; }

public static bool TryWriteInt16LittleEndian(Span<byte> buffer, short value) { throw null; }
public static bool TryWriteInt32LittleEndian(Span<byte> buffer, int value) { throw null; }
public static bool TryWriteInt64LittleEndian(Span<byte> buffer, long value) { throw null; }
public static bool TryWriteUInt16LittleEndian(Span<byte> buffer, ushort value) { throw null; }
public static bool TryWriteUInt32LittleEndian(Span<byte> buffer, uint value) { throw null; }
public static bool TryWriteUInt64LittleEndian(Span<byte> buffer, ulong value) { throw null; }

public static void WriteInt16BigEndian(Span<byte> buffer, short value) { throw null; }
public static void WriteInt32BigEndian(Span<byte> buffer, int value) { throw null; }
public static void WriteInt64BigEndian(Span<byte> buffer, long value) { throw null; }
public static void WriteUInt16BigEndian(Span<byte> buffer, ushort value) { throw null; }
public static void WriteUInt32BigEndian(Span<byte> buffer, uint value) { throw null; }
public static void WriteUInt64BigEndian(Span<byte> buffer, ulong value) { throw null; }

public static bool TryWriteInt16BigEndian(Span<byte> buffer, short value) { throw null; }
public static bool TryWriteInt32BigEndian(Span<byte> buffer, int value) { throw null; }
public static bool TryWriteInt64BigEndian(Span<byte> buffer, long value) { throw null; }
public static bool TryWriteUInt16BigEndian(Span<byte> buffer, ushort value) { throw null; }
public static bool TryWriteUInt32BigEndian(Span<byte> buffer, uint value) { throw null; }
public static bool TryWriteUInt64BigEndian(Span<byte> buffer, ulong value) { throw null; }
}
}
}
3 changes: 0 additions & 3 deletions src/System.Buffers/ref/System.Buffers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
<ItemGroup>
<Compile Include="System.Buffers.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Memory\ref\System.Memory.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.1'">
<Reference Include="System.Runtime" />
</ItemGroup>
Expand Down
17 changes: 1 addition & 16 deletions src/System.Buffers/src/System.Buffers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<PropertyGroup>
<ProjectGuid>{2ADDB484-6F57-4D71-A3FE-A57EC6329A2B}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLSCompliant>false</CLSCompliant>
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'">true</IsPartialFacadeAssembly>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' != 'netstandard' and '$(TargetGroup)' != 'netstandard1.1'">true</IsPartialFacadeAssembly>
<ExcludeResourcesImport Condition="'$(IsPartialFacadeAssembly)'=='true'">true</ExcludeResourcesImport>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
Expand All @@ -22,15 +21,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uapaot-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uapaot-Windows_NT-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System\Buffers\Binary\BinaryHelpers.cs" />
<Compile Include="System\Buffers\Binary\Reader.cs" />
<Compile Include="System\Buffers\Binary\ReaderBigEndian.cs" />
<Compile Include="System\Buffers\Binary\ReaderLittleEndian.cs" />
<Compile Include="System\Buffers\Binary\Writer.cs" />
<Compile Include="System\Buffers\Binary\WriterBigEndian.cs" />
<Compile Include="System\Buffers\Binary\WriterLittleEndian.cs" />
</ItemGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Compile Include="System\Buffers\ArrayPool.cs" />
<Compile Include="System\Buffers\ArrayPoolEventSource.cs" />
Expand All @@ -40,18 +30,13 @@
</ItemGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.Extensions\src\System.Runtime.Extensions.csproj" />
<ProjectReference Include="..\..\System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
</ItemGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Diagnostics.Tracing" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Threading" />
<Reference Include="System.Memory" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
43 changes: 0 additions & 43 deletions src/System.Buffers/src/System/Buffers/Binary/BinaryHelpers.cs

This file was deleted.

149 changes: 0 additions & 149 deletions src/System.Buffers/tests/Binary/TestHelpers.cs

This file was deleted.

This file was deleted.

Loading

0 comments on commit d612683

Please sign in to comment.