Update aspnet50/aspnetcore50 => dnx451/dnxcore50.

This commit is contained in:
N. Taylor Mullen 2015-03-08 13:00:33 -07:00
parent 74ea7f723d
commit 099494c5d3
42 changed files with 117 additions and 117 deletions

View File

@ -1,10 +1,10 @@
{ {
"dependencies": { "dependencies": {
"Microsoft.Net.Http.Server": "1.0.0-*" "Microsoft.Net.Http.Server": "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"aspnet50": { }, "dnx451": { },
"aspnetcore50": { "dnxcore50": {
"dependencies": { "dependencies": {
"System.Collections": "4.0.10-beta-*", "System.Collections": "4.0.10-beta-*",
"System.Console": "4.0.0-beta-*", "System.Console": "4.0.0-beta-*",

View File

@ -17,7 +17,7 @@
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:12345" "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:12345"
}, },
"frameworks" : { "frameworks" : {
"aspnet50" : { }, "dnx451" : { },
"aspnetcore50" : { } "dnxcore50" : { }
} }
} }

View File

@ -1,4 +1,4 @@
{ {
"webroot": "wwwroot", "webroot": "wwwroot",
"dependencies": { "dependencies": {
"Microsoft.AspNet.Hosting": "1.0.0-*", "Microsoft.AspNet.Hosting": "1.0.0-*",
@ -7,7 +7,7 @@
}, },
"commands": { "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:8080" }, "commands": { "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:8080" },
"frameworks": { "frameworks": {
"aspnet50": { }, "dnx451": { },
"aspnetcore50": { } "dnxcore50": { }
} }
} }

View File

@ -1,4 +1,4 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "ASP.NET 5 self-host web server.", "description": "ASP.NET 5 self-host web server.",
"dependencies": { "dependencies": {
@ -15,7 +15,7 @@
"allowUnsafe": true "allowUnsafe": true
}, },
"frameworks": { "frameworks": {
"aspnet50": { }, "dnx451": { },
"aspnetcore50": { } "dnxcore50": { }
} }
} }

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -38,7 +38,7 @@ namespace Microsoft.Net.Http.Server
/// </summary> /// </summary>
public sealed class AuthenticationManager public sealed class AuthenticationManager
{ {
#if ASPNETCORE50 #if DNXCORE50
private static readonly int AuthInfoSize = private static readonly int AuthInfoSize =
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_AUTHENTICATION_INFO>(); Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_AUTHENTICATION_INFO>();
#else #else

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -32,7 +32,7 @@ namespace Microsoft.Net.Http.Server
static ComNetOS() static ComNetOS()
{ {
#if ASPNETCORE50 #if DNXCORE50
// TODO: SkipIOCPCallbackOnSuccess doesn't work on Win7. Need a way to detect Win7 vs 8+. // TODO: SkipIOCPCallbackOnSuccess doesn't work on Win7. Need a way to detect Win7 vs 8+.
IsWin8orLater = false; IsWin8orLater = false;
#else #else

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -26,7 +26,7 @@ using System.Diagnostics;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Security; using System.Security;
#if !ASPNETCORE50 #if !DNXCORE50
using Microsoft.Win32; using Microsoft.Win32;
#endif #endif
@ -34,7 +34,7 @@ namespace Microsoft.Net.Http.Server
{ {
internal static class HttpSysSettings internal static class HttpSysSettings
{ {
#if !ASPNETCORE50 #if !DNXCORE50
private const string HttpSysParametersKey = @"System\CurrentControlSet\Services\HTTP\Parameters"; private const string HttpSysParametersKey = @"System\CurrentControlSet\Services\HTTP\Parameters";
#endif #endif
private const bool EnableNonUtf8Default = true; private const bool EnableNonUtf8Default = true;
@ -61,7 +61,7 @@ namespace Microsoft.Net.Http.Server
} }
private static void ReadHttpSysRegistrySettings() private static void ReadHttpSysRegistrySettings()
#if ASPNETCORE50 #if DNXCORE50
{ {
} }
#else #else

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -32,7 +32,7 @@ namespace Microsoft.Net.Http.Server
get get
{ {
return Environment.HasShutdownStarted return Environment.HasShutdownStarted
#if !ASPNETCORE50 #if !DNXCORE50
|| AppDomain.CurrentDomain.IsFinalizingForUnload() || AppDomain.CurrentDomain.IsFinalizingForUnload()
#endif #endif
; ;

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -32,7 +32,7 @@ namespace Microsoft.Net.Http.Server
{ {
private const string HTTPAPI = "httpapi.dll"; private const string HTTPAPI = "httpapi.dll";
#if ASPNETCORE50 #if DNXCORE50
private const string sspicli_LIB = "sspicli.dll"; private const string sspicli_LIB = "sspicli.dll";
private const string api_ms_win_core_processthreads_LIB = "api-ms-win-core-processthreads-l1-1-1.dll"; private const string api_ms_win_core_processthreads_LIB = "api-ms-win-core-processthreads-l1-1-1.dll";
private const string api_ms_win_core_io_LIB = "api-ms-win-core-io-l1-1-1.dll"; private const string api_ms_win_core_io_LIB = "api-ms-win-core-io-l1-1-1.dll";
@ -59,21 +59,21 @@ namespace Microsoft.Net.Http.Server
internal const uint ERROR_CONNECTION_INVALID = 1229; internal const uint ERROR_CONNECTION_INVALID = 1229;
} }
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_processthreads_LIB, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(api_ms_win_core_processthreads_LIB, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
#endif #endif
internal static extern uint GetCurrentThreadId(); internal static extern uint GetCurrentThreadId();
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_io_LIB, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(api_ms_win_core_io_LIB, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
#endif #endif
internal static unsafe extern uint CancelIoEx(SafeHandle handle, SafeNativeOverlapped overlapped); internal static unsafe extern uint CancelIoEx(SafeHandle handle, SafeNativeOverlapped overlapped);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_kernel32_legacy_LIB, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(api_ms_win_core_kernel32_legacy_LIB, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
@ -90,7 +90,7 @@ namespace Microsoft.Net.Http.Server
internal static class SafeNetHandles internal static class SafeNetHandles
{ {
#if ASPNETCORE50 #if DNXCORE50
[DllImport(sspicli_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(sspicli_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(SECUR32, ExactSpelling = true, SetLastError = true)] [DllImport(SECUR32, ExactSpelling = true, SetLastError = true)]
@ -98,7 +98,7 @@ namespace Microsoft.Net.Http.Server
internal static extern int FreeContextBuffer( internal static extern int FreeContextBuffer(
[In] IntPtr contextBuffer); [In] IntPtr contextBuffer);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(sspicli_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(sspicli_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(SECUR32, ExactSpelling = true, SetLastError = true)] [DllImport(SECUR32, ExactSpelling = true, SetLastError = true)]
@ -115,21 +115,21 @@ namespace Microsoft.Net.Http.Server
[DllImport(HTTPAPI, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)] [DllImport(HTTPAPI, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
internal static extern unsafe uint HttpCloseRequestQueue(IntPtr pReqQueueHandle); internal static extern unsafe uint HttpCloseRequestQueue(IntPtr pReqQueueHandle);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_handle_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(api_ms_win_core_handle_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)]
#endif #endif
internal static extern bool CloseHandle(IntPtr handle); internal static extern bool CloseHandle(IntPtr handle);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_heap_obsolete_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(api_ms_win_core_heap_obsolete_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)]
#endif #endif
internal static extern SafeLocalFree LocalAlloc(int uFlags, UIntPtr sizetdwBytes); internal static extern SafeLocalFree LocalAlloc(int uFlags, UIntPtr sizetdwBytes);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_heap_obsolete_LIB, EntryPoint = "LocalAlloc", SetLastError = true)] [DllImport(api_ms_win_core_heap_obsolete_LIB, EntryPoint = "LocalAlloc", SetLastError = true)]
#else #else
[DllImport(KERNEL32, EntryPoint = "LocalAlloc", SetLastError = true)] [DllImport(KERNEL32, EntryPoint = "LocalAlloc", SetLastError = true)]
@ -137,21 +137,21 @@ namespace Microsoft.Net.Http.Server
internal static extern SafeLocalFreeChannelBinding LocalAllocChannelBinding(int uFlags, UIntPtr sizetdwBytes); internal static extern SafeLocalFreeChannelBinding LocalAllocChannelBinding(int uFlags, UIntPtr sizetdwBytes);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_heap_obsolete_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(api_ms_win_core_heap_obsolete_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)]
#endif #endif
internal static extern IntPtr LocalFree(IntPtr handle); internal static extern IntPtr LocalFree(IntPtr handle);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)] [DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)]
#endif #endif
internal static extern unsafe SafeLoadLibrary LoadLibraryExW([In] string lpwLibFileName, [In] void* hFile, [In] uint dwFlags); internal static extern unsafe SafeLoadLibrary LoadLibraryExW([In] string lpwLibFileName, [In] void* hFile, [In] uint dwFlags);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)]

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -109,7 +109,7 @@ namespace Microsoft.Net.Http.Server
{ {
return _requestStream.ReadByte(); return _requestStream.ReadByte();
} }
#if !ASPNETCORE50 #if !DNXCORE50
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)
{ {
return _requestStream.BeginRead(buffer, offset, count, callback, state); return _requestStream.BeginRead(buffer, offset, count, callback, state);
@ -143,7 +143,7 @@ namespace Microsoft.Net.Http.Server
{ {
_responseStream.WriteByte(value); _responseStream.WriteByte(value);
} }
#if !ASPNETCORE50 #if !DNXCORE50
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)
{ {
return _responseStream.BeginWrite(buffer, offset, count, callback, state); return _responseStream.BeginWrite(buffer, offset, count, callback, state);

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -198,7 +198,7 @@ namespace Microsoft.Net.Http.Server
} }
} }
#if ASPNETCORE50 #if DNXCORE50
public unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
#else #else
public override unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public override unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
@ -291,7 +291,7 @@ namespace Microsoft.Net.Http.Server
return asyncResult; return asyncResult;
} }
#if ASPNETCORE50 #if DNXCORE50
public int EndRead(IAsyncResult asyncResult) public int EndRead(IAsyncResult asyncResult)
#else #else
public override int EndRead(IAsyncResult asyncResult) public override int EndRead(IAsyncResult asyncResult)
@ -426,7 +426,7 @@ namespace Microsoft.Net.Http.Server
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
} }
#if ASPNETCORE50 #if DNXCORE50
public IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
#else #else
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
@ -435,7 +435,7 @@ namespace Microsoft.Net.Http.Server
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
} }
#if ASPNETCORE50 #if DNXCORE50
public void EndWrite(IAsyncResult asyncResult) public void EndWrite(IAsyncResult asyncResult)
#else #else
public override void EndWrite(IAsyncResult asyncResult) public override void EndWrite(IAsyncResult asyncResult)

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -70,7 +70,7 @@ namespace Microsoft.Net.Http.Server
// TODO: False triggers more detailed/correct parsing, but it's rather slow. // TODO: False triggers more detailed/correct parsing, but it's rather slow.
UseCookedRequestUrl = true; // SettingsSectionInternal.Section.HttpListenerUnescapeRequestUrl; UseCookedRequestUrl = true; // SettingsSectionInternal.Section.HttpListenerUnescapeRequestUrl;
Utf8Encoding = new UTF8Encoding(false, true); Utf8Encoding = new UTF8Encoding(false, true);
#if ASPNETCORE50 #if DNXCORE50
AnsiEncoding = Utf8Encoding; AnsiEncoding = Utf8Encoding;
#else #else
AnsiEncoding = Encoding.GetEncoding(0, new EncoderExceptionFallback(), new DecoderExceptionFallback()); AnsiEncoding = Encoding.GetEncoding(0, new EncoderExceptionFallback(), new DecoderExceptionFallback());

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -709,7 +709,7 @@ namespace Microsoft.Net.Http.Server
knownHeaderInfo[_nativeResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders; knownHeaderInfo[_nativeResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders;
knownHeaderInfo[_nativeResponse.ResponseInfoCount].Length = knownHeaderInfo[_nativeResponse.ResponseInfoCount].Length =
#if ASPNETCORE50 #if DNXCORE50
(uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>(); (uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>();
#else #else
(uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS)); (uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS));

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -195,7 +195,7 @@ namespace Microsoft.Net.Http.Server
throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); throw new InvalidOperationException(Resources.Exception_WriteOnlyStream);
} }
#if !ASPNETCORE50 #if !DNXCORE50
public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
{ {
throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); throw new InvalidOperationException(Resources.Exception_WriteOnlyStream);
@ -360,7 +360,7 @@ namespace Microsoft.Net.Http.Server
// TODO: Verbose log data written // TODO: Verbose log data written
} }
#if ASPNETCORE50 #if DNXCORE50
public unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
#else #else
public override unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state) public override unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
@ -465,7 +465,7 @@ namespace Microsoft.Net.Http.Server
return asyncResult; return asyncResult;
} }
#if ASPNETCORE50 #if DNXCORE50
public void EndWrite(IAsyncResult asyncResult) public void EndWrite(IAsyncResult asyncResult)
#else #else
public override void EndWrite(IAsyncResult asyncResult) public override void EndWrite(IAsyncResult asyncResult)

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -140,7 +140,7 @@ namespace Microsoft.Net.Http.Server
overlapped.AsyncResult = this; overlapped.AsyncResult = this;
int bufferSize = 1024 * 64; // TODO: Validate buffer size choice. int bufferSize = 1024 * 64; // TODO: Validate buffer size choice.
#if ASPNETCORE50 #if DNXCORE50
_fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, bufferSize /*, useAsync: true*/); // Extremely expensive. _fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, bufferSize /*, useAsync: true*/); // Extremely expensive.
#else #else
// It's too expensive to validate anything before opening the file. Open the file and then check the lengths. // It's too expensive to validate anything before opening the file. Open the file and then check the lengths.

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -35,7 +35,7 @@ namespace Microsoft.Net.Http.Server
/// </summary> /// </summary>
public sealed class TimeoutManager public sealed class TimeoutManager
{ {
#if ASPNETCORE50 #if DNXCORE50
private static readonly int TimeoutLimitSize = private static readonly int TimeoutLimitSize =
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_TIMEOUT_LIMIT_INFO>(); Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_TIMEOUT_LIMIT_INFO>();
#else #else

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -41,7 +41,7 @@ namespace Microsoft.Net.Http.Server
public sealed class WebListener : IDisposable public sealed class WebListener : IDisposable
{ {
private const long DefaultRequestQueueLength = 1000; // Http.sys default. private const long DefaultRequestQueueLength = 1000; // Http.sys default.
#if ASPNETCORE50 #if DNXCORE50
private static readonly int RequestChannelBindStatusSize = private static readonly int RequestChannelBindStatusSize =
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>(); Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>();
private static readonly int BindingInfoSize = private static readonly int BindingInfoSize =
@ -749,7 +749,7 @@ namespace Microsoft.Net.Http.Server
knownHeaderInfo[httpResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders; knownHeaderInfo[httpResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders;
knownHeaderInfo[httpResponse.ResponseInfoCount].Length = knownHeaderInfo[httpResponse.ResponseInfoCount].Length =
#if ASPNETCORE50 #if DNXCORE50
(uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>(); (uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>();
#else #else
(uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS)); (uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS));
@ -841,7 +841,7 @@ namespace Microsoft.Net.Http.Server
private static int GetTokenOffsetFromBlob(IntPtr blob) private static int GetTokenOffsetFromBlob(IntPtr blob)
{ {
Debug.Assert(blob != IntPtr.Zero); Debug.Assert(blob != IntPtr.Zero);
#if ASPNETCORE50 #if DNXCORE50
IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelToken")); IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelToken"));
#else #else
IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelToken")); IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelToken"));
@ -853,7 +853,7 @@ namespace Microsoft.Net.Http.Server
private static int GetTokenSizeFromBlob(IntPtr blob) private static int GetTokenSizeFromBlob(IntPtr blob)
{ {
Debug.Assert(blob != IntPtr.Zero); Debug.Assert(blob != IntPtr.Zero);
#if ASPNETCORE50 #if DNXCORE50
return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelTokenSize")); return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelTokenSize"));
#else #else
return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelTokenSize")); return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelTokenSize"));

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -45,7 +45,7 @@ namespace Microsoft.Net.Http.Server
: base(errorCode, message) : base(errorCode, message)
{ {
} }
#if ASPNETCORE50 #if DNXCORE50
public int ErrorCode public int ErrorCode
#else #else
// the base class returns the HResult with this property // the base class returns the HResult with this property

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// //
// ==--== // ==--==
#if ASPNETCORE50 #if DNXCORE50
namespace Microsoft.Win32.SafeHandles namespace Microsoft.Win32.SafeHandles
{ {

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// //
// ==--== // ==--==
#if ASPNETCORE50 #if DNXCORE50
namespace Microsoft.Win32.SafeHandles namespace Microsoft.Win32.SafeHandles
{ {

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// </copyright> // </copyright>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ASPNETCORE50 #if DNXCORE50
using System; using System;
using System.ComponentModel; using System.ComponentModel;

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// </copyright> // </copyright>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ASPNETCORE50 #if DNXCORE50
namespace System namespace System
{ {
@ -30,4 +30,4 @@ namespace System
public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll"; public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll";
} }
} }
#endif #endif

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -31,7 +31,7 @@
** **
=============================================================================*/ =============================================================================*/
#if ASPNETCORE50 #if DNXCORE50
namespace System.Runtime.InteropServices namespace System.Runtime.InteropServices
{ {

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// </copyright> // </copyright>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ASPNETCORE50 #if DNXCORE50
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;

View File

@ -1,4 +1,4 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "Implementation of WebListener, a successor to HttpListener. It is used in the WebListener server package.", "description": "Implementation of WebListener, a successor to HttpListener. It is used in the WebListener server package.",
"dependencies": { "dependencies": {
@ -10,8 +10,8 @@
}, },
"frameworks": { "frameworks": {
"net45": { }, "net45": { },
"aspnet50": { }, "dnx451": { },
"aspnetcore50": { "dnxcore50": {
"dependencies": { "dependencies": {
"Microsoft.Win32.Primitives": "4.0.0-beta-*", "Microsoft.Win32.Primitives": "4.0.0-beta-*",
"System.Diagnostics.Debug": "4.0.10-beta-*", "System.Diagnostics.Debug": "4.0.10-beta-*",

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -87,7 +87,7 @@ namespace Microsoft.Net.WebSockets
get get
{ {
return Environment.HasShutdownStarted return Environment.HasShutdownStarted
#if !ASPNETCORE50 #if !DNXCORE50
|| AppDomain.CurrentDomain.IsFinalizingForUnload() || AppDomain.CurrentDomain.IsFinalizingForUnload()
#endif #endif
; ;

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -31,7 +31,7 @@ namespace Microsoft.Net.WebSockets
{ {
internal static class UnsafeNativeMethods internal static class UnsafeNativeMethods
{ {
#if ASPNETCORE50 #if DNXCORE50
private const string api_ms_win_core_libraryloader_LIB = "api-ms-win-core-libraryloader-l1-1-0.dll"; private const string api_ms_win_core_libraryloader_LIB = "api-ms-win-core-libraryloader-l1-1-0.dll";
#else #else
private const string KERNEL32 = "kernel32.dll"; private const string KERNEL32 = "kernel32.dll";
@ -40,14 +40,14 @@ namespace Microsoft.Net.WebSockets
internal static class SafeNetHandles internal static class SafeNetHandles
{ {
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)] [DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, CharSet=CharSet.Unicode, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, CharSet=CharSet.Unicode, SetLastError = true)]
#endif #endif
internal static extern unsafe SafeLoadLibrary LoadLibraryExW([In] string lpwLibFileName, [In] void* hFile, [In] uint dwFlags); internal static extern unsafe SafeLoadLibrary LoadLibraryExW([In] string lpwLibFileName, [In] void* hFile, [In] uint dwFlags);
#if ASPNETCORE50 #if DNXCORE50
[DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, SetLastError = true)] [DllImport(api_ms_win_core_libraryloader_LIB, ExactSpelling = true, SetLastError = true)]
#else #else
[DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)] [DllImport(KERNEL32, ExactSpelling = true, SetLastError = true)]
@ -173,7 +173,7 @@ namespace Microsoft.Net.WebSockets
static WebSocketProtocolComponent() static WebSocketProtocolComponent()
{ {
#if ASPNETCORE50 #if DNXCORE50
DllFileName = Path.Combine(Environment.GetEnvironmentVariable("SYSTEMROOT"), "System32", WEBSOCKET); DllFileName = Path.Combine(Environment.GetEnvironmentVariable("SYSTEMROOT"), "System32", WEBSOCKET);
#else #else
DllFileName = Path.Combine(Environment.SystemDirectory, WEBSOCKET); DllFileName = Path.Combine(Environment.SystemDirectory, WEBSOCKET);

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -1103,7 +1103,7 @@ namespace Microsoft.Net.WebSockets
if (thisLockTaken || sessionHandleLockTaken) if (thisLockTaken || sessionHandleLockTaken)
{ {
#if !ASPNETCORE50 #if !DNXCORE50
RuntimeHelpers.PrepareConstrainedRegions(); RuntimeHelpers.PrepareConstrainedRegions();
#endif #endif
try try
@ -1189,7 +1189,7 @@ namespace Microsoft.Net.WebSockets
Contract.Assert(lockObject != null, "'lockObject' MUST NOT be NULL."); Contract.Assert(lockObject != null, "'lockObject' MUST NOT be NULL.");
if (lockTaken) if (lockTaken)
{ {
#if !ASPNETCORE50 #if !DNXCORE50
RuntimeHelpers.PrepareConstrainedRegions(); RuntimeHelpers.PrepareConstrainedRegions();
#endif #endif
try try
@ -2253,7 +2253,7 @@ namespace Microsoft.Net.WebSockets
"'webSocket.m_KeepAliveTracker' MUST NOT be NULL at this point."); "'webSocket.m_KeepAliveTracker' MUST NOT be NULL at this point.");
int keepAliveIntervalMilliseconds = (int)_keepAliveInterval.TotalMilliseconds; int keepAliveIntervalMilliseconds = (int)_keepAliveInterval.TotalMilliseconds;
Contract.Assert(keepAliveIntervalMilliseconds > 0, "'keepAliveIntervalMilliseconds' MUST be POSITIVE."); Contract.Assert(keepAliveIntervalMilliseconds > 0, "'keepAliveIntervalMilliseconds' MUST be POSITIVE.");
#if ASPNETCORE50 #if DNXCORE50
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite); _keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
#else #else
if (ExecutionContext.IsFlowSuppressed()) if (ExecutionContext.IsFlowSuppressed())

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -50,7 +50,7 @@ namespace Microsoft.Net.WebSockets
public const int MinSendBufferSize = 16; public const int MinSendBufferSize = 16;
internal const int MinReceiveBufferSize = 256; internal const int MinReceiveBufferSize = 256;
internal const int MaxBufferSize = 64 * 1024; internal const int MaxBufferSize = 64 * 1024;
#if ASPNETCORE50 #if DNXCORE50
private static readonly int SizeOfUInt = Marshal.SizeOf<uint>(); private static readonly int SizeOfUInt = Marshal.SizeOf<uint>();
private static readonly int SizeOfBool = Marshal.SizeOf<bool>(); private static readonly int SizeOfBool = Marshal.SizeOf<bool>();
#else #else

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
namespace Microsoft.Net.WebSockets namespace Microsoft.Net.WebSockets
{ {
#if !ASPNETCORE50 #if !DNXCORE50
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable")]
#endif #endif
internal sealed class WebSocketException : Win32Exception internal sealed class WebSocketException : Win32Exception

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// //
// ==--== // ==--==
#if ASPNETCORE50 #if DNXCORE50
namespace Microsoft.Win32.SafeHandles namespace Microsoft.Win32.SafeHandles
{ {

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
// See the Apache 2 License for the specific language governing // See the Apache 2 License for the specific language governing
// permissions and limitations under the License. // permissions and limitations under the License.
#if ASPNETCORE50 #if DNXCORE50
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// </copyright> // </copyright>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ASPNETCORE50 #if DNXCORE50
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// </copyright> // </copyright>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ASPNETCORE50 #if DNXCORE50
namespace System namespace System
{ {
@ -30,4 +30,4 @@ namespace System
public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll"; public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll";
} }
} }
#endif #endif

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -31,7 +31,7 @@
** **
=============================================================================*/ =============================================================================*/
#if ASPNETCORE50 #if DNXCORE50
namespace System.Runtime.InteropServices namespace System.Runtime.InteropServices
{ {

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
// </copyright> // </copyright>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ASPNETCORE50 #if DNXCORE50
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
// See the Apache 2 License for the specific language governing // See the Apache 2 License for the specific language governing
// permissions and limitations under the License. // permissions and limitations under the License.
#if ASPNETCORE50 #if DNXCORE50
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,4 +1,4 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "Implementation of WebSocket abstract base class. Used by WebListener.", "description": "Implementation of WebSocket abstract base class. Used by WebListener.",
"dependencies": { "dependencies": {
@ -7,7 +7,7 @@
"compilationOptions": { "allowUnsafe": true }, "compilationOptions": { "allowUnsafe": true },
"frameworks": { "frameworks": {
"net45": { }, "net45": { },
"aspnetcore50": { "dnxcore50": {
"dependencies": { "dependencies": {
"System.Collections": "4.0.10-beta-*", "System.Collections": "4.0.10-beta-*",
"System.Diagnostics.Contracts": "4.0.0-beta-*", "System.Diagnostics.Contracts": "4.0.0-beta-*",

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. // Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved // All Rights Reserved
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -67,7 +67,7 @@ namespace Microsoft.AspNet.Server.WebListener
Assert.Equal("Hello World", response); Assert.Equal("Hello World", response);
} }
} }
#if !ASPNETCORE50 #if !DNXCORE50
[Fact] [Fact]
public async Task RequestBody_ReadBeginEnd_Success() public async Task RequestBody_ReadBeginEnd_Success()
{ {

View File

@ -1,4 +1,4 @@
{ {
"commands": { "commands": {
"test": "xunit.runner.kre" "test": "xunit.runner.kre"
}, },
@ -9,7 +9,7 @@
"xunit.runner.kre": "1.0.0-*" "xunit.runner.kre": "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"aspnet50": { "dnx451": {
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Net.Http": "", "System.Net.Http": "",
"System.Net.Http.WebRequest": "" "System.Net.Http.WebRequest": ""

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System; using System;
using System.IO; using System.IO;
@ -51,7 +51,7 @@ namespace Microsoft.Net.Http.Server
Assert.Equal("Hello World", response); Assert.Equal("Hello World", response);
} }
} }
#if ASPNET50 #if DNX451
[Fact] [Fact]
public async Task RequestBody_ReadBeginEnd_Success() public async Task RequestBody_ReadBeginEnd_Success()
{ {

View File

@ -1,4 +1,4 @@
{ {
"commands": { "commands": {
"test": "xunit.runner.kre" "test": "xunit.runner.kre"
}, },
@ -8,7 +8,7 @@
"xunit.runner.kre": "1.0.0-*" "xunit.runner.kre": "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"aspnet50": { "dnx451": {
frameworkAssemblies: { frameworkAssemblies: {
"System.Net.Http": "", "System.Net.Http": "",
"System.Net.Http.WebRequest": "" "System.Net.Http.WebRequest": ""