Skip to content
Permalink
Browse files

Add target for .NET Standard 2.1

  • Loading branch information...
brantburnett committed Apr 14, 2019
1 parent 86fc159 commit 4e97a7c311d77aaaa7beb92a1e7a9937a1460048
@@ -1,14 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.156
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.IO.RecyclableMemoryStream", "src\Microsoft.IO.RecyclableMemoryStream.csproj", "{4B52F0CE-5F4C-43E7-A054-50CA0A502CF3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.IO.RecyclableMemoryStream", "src\Microsoft.IO.RecyclableMemoryStream.csproj", "{4B52F0CE-5F4C-43E7-A054-50CA0A502CF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{419C9F3D-71CC-4F95-8324-E15CD0D1E754}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{419C9F3D-71CC-4F95-8324-E15CD0D1E754}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DF4A161A-7C52-46A2-A0ED-427C1C6F29AA}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
LICENSE = LICENSE
README.md = README.md
EndProjectSection
@@ -31,4 +32,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D5E147AF-721B-469D-AD77-A00A290340AC}
EndGlobalSection
EndGlobal
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "3.0.100-preview3-010431"
}
}
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.4;net40;net45;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>netstandard1.4;netstandard2.1;net40;net45;netcoreapp2.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<!-- for assembly signing we use a magic variable coupled with a special build definition which skips UTs -->
@@ -530,7 +530,7 @@ public int SafeRead(byte[] buffer, int offset, int count, ref int streamPosition
return amountRead;
}

#if NETCOREAPP2_1
#if NETCOREAPP2_1 || NETSTANDARD2_1
/// <summary>
/// Reads from the current position into the provided buffer
/// </summary>
@@ -640,7 +640,7 @@ public override void Write(byte[] buffer, int offset, int count)
this.length = Math.Max(this.position, this.length);
}

#if NETCOREAPP2_1
#if NETCOREAPP2_1 || NETSTANDARD2_1
/// <summary>
/// Writes the buffer to the stream
/// </summary>
@@ -898,7 +898,7 @@ private int InternalRead(byte[] buffer, int offset, int count, int fromPosition)
return amountToCopy;
}

#if NETCOREAPP2_1
#if NETCOREAPP2_1 || NETSTANDARD2_1
private int InternalRead(Span<byte> buffer, int fromPosition)
{
if (this.length - fromPosition <= 0)

0 comments on commit 4e97a7c

Please sign in to comment.
You can’t perform that action at this time.