Update to new corefx packages (#486)

This commit is contained in:
BrennanConroy 2017-12-11 09:02:11 -08:00 committed by Justin Kotalik
parent 869e3d37c8
commit 2cf020103a
7 changed files with 16 additions and 29 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

@ -29,8 +29,7 @@
<MicrosoftExtensionsPlatformAbstractionsPackageVersion>1.1.0</MicrosoftExtensionsPlatformAbstractionsPackageVersion> <MicrosoftExtensionsPlatformAbstractionsPackageVersion>1.1.0</MicrosoftExtensionsPlatformAbstractionsPackageVersion>
<MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.1.0-preview1-27644</MicrosoftExtensionsSecurityHelperSourcesPackageVersion> <MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.1.0-preview1-27644</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-25914-04</SystemBuffersPackageVersion>
<SystemIOPipelinesPackageVersion>0.1.0-alpha-002</SystemIOPipelinesPackageVersion> <SystemIOPipelinesPackageVersion>0.1.0-alpha-002</SystemIOPipelinesPackageVersion>

View File

@ -1,7 +1,2 @@
<<<<<<< HEAD
version:2.1.0-preview1-15620 version:2.1.0-preview1-15620
commithash:6432b49a2c00310416df39b6fe548ef4af9c6011 commithash:6432b49a2c00310416df39b6fe548ef4af9c6011
=======
version:2.1.0-preview1-15618
commithash:00ce1383114015fe89b221146036e59e6bc11219
>>>>>>> 0dae9f5... Update dependencies.props

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]