netcoreapp2.0 (#121)

This commit is contained in:
John Luo 2017-05-05 10:11:29 -07:00 committed by Mike Harder
parent 0e83bce219
commit 1be9dc10ab
8 changed files with 6 additions and 29 deletions

1
.gitignore vendored
View File

@ -26,6 +26,7 @@ nuget.exe
*.sln.ide *.sln.ide
project.lock.json project.lock.json
/.vs/ /.vs/
.vscode/
.build/ .build/
.testPublish/ .testPublish/
launchSettings.json launchSettings.json

View File

@ -3,7 +3,7 @@
<Import Project="..\..\build\dependencies.props" /> <Import Project="..\..\build\dependencies.props" />
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks> <TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Description>ASP.NET Core response caching middleware abstractions and feature interface definitions.</Description> <Description>ASP.NET Core response caching middleware abstractions and feature interface definitions.</Description>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;cache;caching</PackageTags> <PackageTags>aspnetcore;cache;caching</PackageTags>
</PropertyGroup> </PropertyGroup>

View File

@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Description>ASP.NET Core middleware for caching HTTP responses on the server.</Description> <Description>ASP.NET Core middleware for caching HTTP responses on the server.</Description>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn> <NoWarn>$(NoWarn);CS1591</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>

View File

@ -183,19 +183,12 @@ namespace Microsoft.AspNetCore.ResponseCaching.Internal
} }
} }
#if NETSTANDARD1_3
public IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
#else
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
#endif
{ {
return StreamUtilities.ToIAsyncResult(WriteAsync(buffer, offset, count), callback, state); return StreamUtilities.ToIAsyncResult(WriteAsync(buffer, offset, count), callback, state);
} }
#if NETSTANDARD1_3
public void EndWrite(IAsyncResult asyncResult)
#else
public override void EndWrite(IAsyncResult asyncResult) public override void EndWrite(IAsyncResult asyncResult)
#endif
{ {
if (asyncResult == null) if (asyncResult == null)
{ {

View File

@ -140,11 +140,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Internal
return byteRead; return byteRead;
} }
#if NETSTANDARD1_3
public IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
#else
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
#endif
{ {
var tcs = new TaskCompletionSource<int>(state); var tcs = new TaskCompletionSource<int>(state);
@ -176,11 +172,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Internal
return tcs.Task; return tcs.Task;
} }
#if NETSTANDARD1_3
public int EndRead(IAsyncResult asyncResult)
#else
public override int EndRead(IAsyncResult asyncResult) public override int EndRead(IAsyncResult asyncResult)
#endif
{ {
if (asyncResult == null) if (asyncResult == null)
{ {

View File

@ -190,20 +190,12 @@ namespace Microsoft.AspNetCore.ResponseCaching.Internal
_length++; _length++;
} }
#if NETSTANDARD1_3
public IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
#else
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
#endif
{ {
return StreamUtilities.ToIAsyncResult(WriteAsync(buffer, offset, count), callback, state); return StreamUtilities.ToIAsyncResult(WriteAsync(buffer, offset, count), callback, state);
} }
#if NETSTANDARD1_3
public void EndWrite(IAsyncResult asyncResult)
#else
public override void EndWrite(IAsyncResult asyncResult) public override void EndWrite(IAsyncResult asyncResult)
#endif
{ {
if (asyncResult == null) if (asyncResult == null)
{ {

View File

@ -3,8 +3,7 @@
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks> <TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup> </PropertyGroup>