From f4953a0b29d373406178b53c1b922628f217cb1a Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 5 Sep 2014 09:06:01 -0700 Subject: [PATCH] Updated to use the new target framework in project.json --- src/Microsoft.AspNet.Hosting/HostingServices.cs | 4 ++-- .../ContainerMiddleware.cs | 8 ++++---- src/Microsoft.AspNet.TestHost/ResponseStream.cs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Microsoft.AspNet.Hosting/HostingServices.cs b/src/Microsoft.AspNet.Hosting/HostingServices.cs index 91e1ef5f31..29a46304ac 100644 --- a/src/Microsoft.AspNet.Hosting/HostingServices.cs +++ b/src/Microsoft.AspNet.Hosting/HostingServices.cs @@ -63,7 +63,7 @@ namespace Microsoft.AspNet.Hosting if (PlatformHelper.IsMono) { -#if NET45 +#if ASPNET50 yield return describer.Instance(DataProtectionProvider.CreateFromLegacyDpapi()); #endif } @@ -77,4 +77,4 @@ namespace Microsoft.AspNet.Hosting } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs b/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs index 38398d3889..518eac189c 100644 --- a/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs +++ b/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs @@ -16,14 +16,14 @@ // permissions and limitations under the License. using System; -#if NET45 +#if ASPNET50 using System.Runtime.Remoting.Messaging; #endif using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using Microsoft.Framework.DependencyInjection; -#if NET45 +#if ASPNET50 using System.Runtime.Remoting; #endif namespace Microsoft.AspNet.RequestContainer @@ -65,7 +65,7 @@ namespace Microsoft.AspNet.RequestContainer private HttpContext AccessRootHttpContext() { -#if NET45 +#if ASPNET50 var handle = CallContext.LogicalGetData(LogicalDataKey) as ObjectHandle; return handle != null ? handle.Unwrap() as HttpContext : null; #else @@ -75,7 +75,7 @@ namespace Microsoft.AspNet.RequestContainer private HttpContext ExchangeRootHttpContext(HttpContext httpContext) { -#if NET45 +#if ASPNET50 var prior = CallContext.LogicalGetData(LogicalDataKey) as ObjectHandle; CallContext.LogicalSetData(LogicalDataKey, new ObjectHandle(httpContext)); return prior != null ? prior.Unwrap() as HttpContext : null; diff --git a/src/Microsoft.AspNet.TestHost/ResponseStream.cs b/src/Microsoft.AspNet.TestHost/ResponseStream.cs index cae4eba46f..64e64c0c64 100644 --- a/src/Microsoft.AspNet.TestHost/ResponseStream.cs +++ b/src/Microsoft.AspNet.TestHost/ResponseStream.cs @@ -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. using System; @@ -161,7 +161,7 @@ namespace Microsoft.AspNet.TestHost _readLock.Release(); } } -#if NET45 +#if ASPNET50 public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { // TODO: This option doesn't preserve the state object. @@ -258,7 +258,7 @@ namespace Microsoft.AspNet.TestHost _writeLock.Release(); } } -#if NET45 +#if ASPNET50 public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { Write(buffer, offset, count);