Updated to use the new target framework in project.json
This commit is contained in:
parent
4b1c1f3552
commit
f4953a0b29
|
|
@ -63,7 +63,7 @@ namespace Microsoft.AspNet.Hosting
|
||||||
|
|
||||||
if (PlatformHelper.IsMono)
|
if (PlatformHelper.IsMono)
|
||||||
{
|
{
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
yield return describer.Instance<IDataProtectionProvider>(DataProtectionProvider.CreateFromLegacyDpapi());
|
yield return describer.Instance<IDataProtectionProvider>(DataProtectionProvider.CreateFromLegacyDpapi());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@
|
||||||
// permissions and limitations under the License.
|
// permissions and limitations under the License.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
using System.Runtime.Remoting.Messaging;
|
using System.Runtime.Remoting.Messaging;
|
||||||
#endif
|
#endif
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
using System.Runtime.Remoting;
|
using System.Runtime.Remoting;
|
||||||
#endif
|
#endif
|
||||||
namespace Microsoft.AspNet.RequestContainer
|
namespace Microsoft.AspNet.RequestContainer
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Microsoft.AspNet.RequestContainer
|
||||||
|
|
||||||
private HttpContext AccessRootHttpContext()
|
private HttpContext AccessRootHttpContext()
|
||||||
{
|
{
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
var handle = CallContext.LogicalGetData(LogicalDataKey) as ObjectHandle;
|
var handle = CallContext.LogicalGetData(LogicalDataKey) as ObjectHandle;
|
||||||
return handle != null ? handle.Unwrap() as HttpContext : null;
|
return handle != null ? handle.Unwrap() as HttpContext : null;
|
||||||
#else
|
#else
|
||||||
|
|
@ -75,7 +75,7 @@ namespace Microsoft.AspNet.RequestContainer
|
||||||
|
|
||||||
private HttpContext ExchangeRootHttpContext(HttpContext httpContext)
|
private HttpContext ExchangeRootHttpContext(HttpContext httpContext)
|
||||||
{
|
{
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
var prior = CallContext.LogicalGetData(LogicalDataKey) as ObjectHandle;
|
var prior = CallContext.LogicalGetData(LogicalDataKey) as ObjectHandle;
|
||||||
CallContext.LogicalSetData(LogicalDataKey, new ObjectHandle(httpContext));
|
CallContext.LogicalSetData(LogicalDataKey, new ObjectHandle(httpContext));
|
||||||
return prior != null ? prior.Unwrap() as HttpContext : null;
|
return prior != null ? prior.Unwrap() as HttpContext : null;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -161,7 +161,7 @@ namespace Microsoft.AspNet.TestHost
|
||||||
_readLock.Release();
|
_readLock.Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
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)
|
||||||
{
|
{
|
||||||
// TODO: This option doesn't preserve the state object.
|
// TODO: This option doesn't preserve the state object.
|
||||||
|
|
@ -258,7 +258,7 @@ namespace Microsoft.AspNet.TestHost
|
||||||
_writeLock.Release();
|
_writeLock.Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
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)
|
||||||
{
|
{
|
||||||
Write(buffer, offset, count);
|
Write(buffer, offset, count);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue