Update to new corefx packages (#486)

This commit is contained in:
BrennanConroy 2017-12-11 09:02:11 -08:00 committed by GitHub
parent 0dae9f527c
commit a1d91fcada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 33 deletions

View File

@ -18,9 +18,4 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<!-- This is an experimental version of the compiler. See https://github.com/dotnet/csharplang/issues/666 for more details. -->
<PackageReference Include="Microsoft.NETCore.Compilers" Version="$(MicrosoftNETCoreCompilersPackageVersion)" PrivateAssets="All" />
</ItemGroup>
</Project> </Project>

View File

@ -3,7 +3,7 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Package Versions"> <PropertyGroup Label="Package Versions">
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15618</InternalAspNetCoreSdkPackageVersion> <InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15620</InternalAspNetCoreSdkPackageVersion>
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>1.0.0-pre-10223</MicrosoftAspNetCoreAspNetCoreModulePackageVersion> <MicrosoftAspNetCoreAspNetCoreModulePackageVersion>1.0.0-pre-10223</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
<MicrosoftAspNetCoreAuthenticationCorePackageVersion>2.1.0-preview1-27773</MicrosoftAspNetCoreAuthenticationCorePackageVersion> <MicrosoftAspNetCoreAuthenticationCorePackageVersion>2.1.0-preview1-27773</MicrosoftAspNetCoreAuthenticationCorePackageVersion>
<MicrosoftAspNetCoreHostingAbstractionsPackageVersion>2.1.0-preview1-27773</MicrosoftAspNetCoreHostingAbstractionsPackageVersion> <MicrosoftAspNetCoreHostingAbstractionsPackageVersion>2.1.0-preview1-27773</MicrosoftAspNetCoreHostingAbstractionsPackageVersion>
@ -26,16 +26,15 @@
<MicrosoftExtensionsOptionsPackageVersion>2.1.0-preview1-27773</MicrosoftExtensionsOptionsPackageVersion> <MicrosoftExtensionsOptionsPackageVersion>2.1.0-preview1-27773</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.1.0-preview1-27773</MicrosoftExtensionsSecurityHelperSourcesPackageVersion> <MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.1.0-preview1-27773</MicrosoftExtensionsSecurityHelperSourcesPackageVersion>
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion> <MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
<MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-25915-01</MicrosoftNETCoreApp21PackageVersion> <MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-26008-01</MicrosoftNETCoreApp21PackageVersion>
<MicrosoftNETCoreCompilersPackageVersion>2.6.0-beta2-62211-02</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion> <MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
<SystemBuffersPackageVersion>4.5.0-preview1-25914-04</SystemBuffersPackageVersion> <SystemBuffersPackageVersion>4.5.0-preview1-26006-06</SystemBuffersPackageVersion>
<SystemIOPipelinesPackageVersion>0.1.0-alpha-002</SystemIOPipelinesPackageVersion> <SystemIOPipelinesPackageVersion>0.1.0-e171206-2</SystemIOPipelinesPackageVersion>
<SystemMemoryPackageVersion>4.5.0-preview1-25914-04</SystemMemoryPackageVersion> <SystemMemoryPackageVersion>4.5.0-preview1-26006-06</SystemMemoryPackageVersion>
<SystemNumericsVectorsPackageVersion>4.5.0-preview1-25914-04</SystemNumericsVectorsPackageVersion> <SystemNumericsVectorsPackageVersion>4.5.0-preview1-26006-06</SystemNumericsVectorsPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.5.0-preview1-25914-04</SystemRuntimeCompilerServicesUnsafePackageVersion> <SystemRuntimeCompilerServicesUnsafePackageVersion>4.5.0-preview1-26006-06</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.5.0-preview1-25914-04</SystemSecurityPrincipalWindowsPackageVersion> <SystemSecurityPrincipalWindowsPackageVersion>4.5.0-preview1-25914-04</SystemSecurityPrincipalWindowsPackageVersion>
<SystemTextEncodingsWebUtf8PackageVersion>0.1.0-alpha-002</SystemTextEncodingsWebUtf8PackageVersion> <SystemTextEncodingsWebUtf8PackageVersion>0.1.0-e171206-2</SystemTextEncodingsWebUtf8PackageVersion>
<XunitPackageVersion>2.3.1</XunitPackageVersion> <XunitPackageVersion>2.3.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.3.1</XunitRunnerVisualStudioPackageVersion> <XunitRunnerVisualStudioPackageVersion>2.3.1</XunitRunnerVisualStudioPackageVersion>
</PropertyGroup> </PropertyGroup>

View File

@ -1,2 +1,2 @@
version:2.1.0-preview1-15618 version:2.1.0-preview1-15620
commithash:00ce1383114015fe89b221146036e59e6bc11219 commithash:6432b49a2c00310416df39b6fe548ef4af9c6011

View File

@ -19,7 +19,6 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpSys.Internal; using Microsoft.AspNetCore.HttpSys.Internal;
using Microsoft.AspNetCore.WebUtilities; using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNetCore.Server.IISIntegration namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
@ -41,7 +40,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
protected Stack<KeyValuePair<Func<object, Task>, object>> _onCompleted; protected Stack<KeyValuePair<Func<object, Task>, object>> _onCompleted;
protected Exception _applicationException; protected Exception _applicationException;
private readonly BufferPool _bufferPool; private readonly MemoryPool _memoryPool;
private GCHandle _thisHandle; private GCHandle _thisHandle;
private MemoryHandle _inputHandle; private MemoryHandle _inputHandle;
@ -64,12 +63,12 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
private const string NegotiateString = "Negotiate"; private const string NegotiateString = "Negotiate";
private const string BasicString = "Basic"; private const string BasicString = "Basic";
internal unsafe IISHttpContext(BufferPool bufferPool, IntPtr pHttpContext, IISOptions options) internal unsafe IISHttpContext(MemoryPool memoryPool, IntPtr pHttpContext, IISOptions options)
: base((HttpApiTypes.HTTP_REQUEST*)NativeMethods.http_get_raw_request(pHttpContext)) : base((HttpApiTypes.HTTP_REQUEST*)NativeMethods.http_get_raw_request(pHttpContext))
{ {
_thisHandle = GCHandle.Alloc(this); _thisHandle = GCHandle.Alloc(this);
_bufferPool = bufferPool; _memoryPool = memoryPool;
_pHttpContext = pHttpContext; _pHttpContext = pHttpContext;
NativeMethods.http_set_managed_context(_pHttpContext, (IntPtr)_thisHandle); NativeMethods.http_set_managed_context(_pHttpContext, (IntPtr)_thisHandle);
@ -142,8 +141,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
RequestBody = new IISHttpRequestBody(this); RequestBody = new IISHttpRequestBody(this);
ResponseBody = new IISHttpResponseBody(this); ResponseBody = new IISHttpResponseBody(this);
Input = new Pipe(new PipeOptions(_bufferPool, readerScheduler: TaskRunScheduler.Default)); Input = new Pipe(new PipeOptions(_memoryPool, readerScheduler: TaskRunScheduler.Default));
var pipe = new Pipe(new PipeOptions(_bufferPool, readerScheduler: TaskRunScheduler.Default)); var pipe = new Pipe(new PipeOptions(_memoryPool, readerScheduler: TaskRunScheduler.Default));
Output = new OutputProducer(pipe); Output = new OutputProducer(pipe);
} }

View File

@ -5,7 +5,6 @@ using System;
using System.Buffers; using System.Buffers;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Threading; using System.Threading;
using System.IO.Pipelines;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Hosting.Server;
@ -15,8 +14,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
private readonly IHttpApplication<TContext> _application; private readonly IHttpApplication<TContext> _application;
public IISHttpContextOfT(BufferPool bufferPool, IHttpApplication<TContext> application, IntPtr pHttpContext, IISOptions options) public IISHttpContextOfT(MemoryPool memoryPool, IHttpApplication<TContext> application, IntPtr pHttpContext, IISOptions options)
: base(bufferPool, pHttpContext, options) : base(memoryPool, pHttpContext, options)
{ {
_application = application; _application = application;
} }

View File

@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
private static NativeMethods.PFN_ASYNC_COMPLETION _onAsyncCompletion = OnAsyncCompletion; private static NativeMethods.PFN_ASYNC_COMPLETION _onAsyncCompletion = OnAsyncCompletion;
private IISContextFactory _iisContextFactory; private IISContextFactory _iisContextFactory;
private readonly BufferPool _bufferPool = new MemoryPool(); private readonly MemoryPool _memoryPool = new MemoryPool();
private GCHandle _httpServerHandle; private GCHandle _httpServerHandle;
private readonly IApplicationLifetime _applicationLifetime; private readonly IApplicationLifetime _applicationLifetime;
private readonly IAuthenticationSchemeProvider _authentication; private readonly IAuthenticationSchemeProvider _authentication;
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
_httpServerHandle = GCHandle.Alloc(this); _httpServerHandle = GCHandle.Alloc(this);
_iisContextFactory = new IISContextFactory<TContext>(_bufferPool, application, _options); _iisContextFactory = new IISContextFactory<TContext>(_memoryPool, application, _options);
// Start the server by registering the callback // Start the server by registering the callback
NativeMethods.register_callbacks(_requestHandler, _shutdownHandler, _onAsyncCompletion, (IntPtr)_httpServerHandle, (IntPtr)_httpServerHandle); NativeMethods.register_callbacks(_requestHandler, _shutdownHandler, _onAsyncCompletion, (IntPtr)_httpServerHandle, (IntPtr)_httpServerHandle);
@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
_httpServerHandle.Free(); _httpServerHandle.Free();
} }
_bufferPool.Dispose(); _memoryPool.Dispose();
} }
private static NativeMethods.REQUEST_NOTIFICATION_STATUS HandleRequest(IntPtr pHttpContext, IntPtr pvRequestContext) private static NativeMethods.REQUEST_NOTIFICATION_STATUS HandleRequest(IntPtr pHttpContext, IntPtr pvRequestContext)
@ -126,19 +126,19 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
private class IISContextFactory<T> : IISContextFactory private class IISContextFactory<T> : IISContextFactory
{ {
private readonly IHttpApplication<T> _application; private readonly IHttpApplication<T> _application;
private readonly BufferPool _bufferPool; private readonly MemoryPool _memoryPool;
private readonly IISOptions _options; private readonly IISOptions _options;
public IISContextFactory(BufferPool bufferPool, IHttpApplication<T> application, IISOptions options) public IISContextFactory(MemoryPool memoryPool, IHttpApplication<T> application, IISOptions options)
{ {
_application = application; _application = application;
_bufferPool = bufferPool; _memoryPool = memoryPool;
_options = options; _options = options;
} }
public IISHttpContext CreateHttpContext(IntPtr pHttpContext) public IISHttpContext CreateHttpContext(IntPtr pHttpContext)
{ {
return new IISHttpContextOfT<T>(_bufferPool, _application, pHttpContext, _options); return new IISHttpContextOfT<T>(_memoryPool, _application, pHttpContext, _options);
} }
} }
} }

View File

@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
[Fact] [Fact]
public Task Https_HelloWorld_NoClientCert_CoreCLR_X64_Portable() public Task Https_HelloWorld_NoClientCert_CoreCLR_X64_Portable()
{ {
return HttpsHelloWorldCerts(RuntimeFlavor.CoreClr, ApplicationType.Portable , port: 44398, sendClientCert: false); return HttpsHelloWorldCerts(RuntimeFlavor.CoreClr, ApplicationType.Portable , port: 44397, sendClientCert: false);
} }
[Fact] [Fact]