Transition to netstandard.

- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
This commit is contained in:
N. Taylor Mullen 2016-03-01 13:37:16 -08:00
parent b94fc1abf3
commit 1e06560676
6 changed files with 31 additions and 17 deletions

View File

@ -8,12 +8,14 @@
"compilationOptions": { "compilationOptions": {
"warningsAsErrors": true, "warningsAsErrors": true,
"keyFile": "../../tools/Key.snk", "keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ], "nowarn": [
"CS1591"
],
"xmlDoc": true "xmlDoc": true
}, },
"frameworks": { "frameworks": {
"net451": {}, "net451": {},
"dotnet5.4": { "netstandard1.3": {
"dependencies": { "dependencies": {
"System.Diagnostics.Contracts": "4.0.1-*", "System.Diagnostics.Contracts": "4.0.1-*",
"System.IO": "4.1.0-*", "System.IO": "4.1.0-*",
@ -26,7 +28,10 @@
"System.Threading": "4.0.11-*", "System.Threading": "4.0.11-*",
"System.Threading.Tasks": "4.0.11-*", "System.Threading.Tasks": "4.0.11-*",
"System.Threading.Timer": "4.0.1-*" "System.Threading.Timer": "4.0.1-*"
} },
"imports": [
"dotnet5.4"
]
} }
} }
} }

View File

@ -3,7 +3,9 @@
"compilationOptions": { "compilationOptions": {
"warningsAsErrors": true, "warningsAsErrors": true,
"keyFile": "../../tools/Key.snk", "keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ], "nowarn": [
"CS1591"
],
"xmlDoc": true "xmlDoc": true
}, },
"description": "ASP.NET 5 web socket middleware for use on top of opaque servers.", "description": "ASP.NET 5 web socket middleware for use on top of opaque servers.",
@ -18,9 +20,11 @@
}, },
"frameworks": { "frameworks": {
"net451": {}, "net451": {},
"dotnet5.4": { "netstandard1.3": {
"dependencies": { "dependencies": {},
} "imports": [
"dotnet5.4"
]
} }
} }
} }

View File

@ -9,11 +9,14 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"frameworks": { "frameworks": {
"dnxcore50": { "netstandardapp1.5": {
"dependencies": { "dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*" "dotnet-test-xunit": "1.0.0-dev-*"
}, },
"imports": "portable-net451+win8" "imports": [
"dnxcore50",
"portable-net451+win8"
]
}, },
"dnx451": {} "dnx451": {}
}, },

View File

@ -138,7 +138,7 @@ namespace Microsoft.AspNetCore.WebSockets.Protocol.Test
} }
} }
#if !DNXCORE50 #if !NETSTANDARDAPP1_5
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.
@ -226,7 +226,7 @@ namespace Microsoft.AspNetCore.WebSockets.Protocol.Test
} }
} }
#if !DNXCORE50 #if !NETSTANDARDAPP1_5
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);

View File

@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.WebSockets.Protocol.Test
return _readStream.Read(buffer, offset, count); return _readStream.Read(buffer, offset, count);
} }
#if !DNXCORE50 #if !NETSTANDARDAPP1_5
public override int ReadByte() public override int ReadByte()
{ {
return _readStream.ReadByte(); return _readStream.ReadByte();
@ -129,7 +129,7 @@ namespace Microsoft.AspNetCore.WebSockets.Protocol.Test
_writeStream.Write(buffer, offset, count); _writeStream.Write(buffer, offset, count);
} }
#if !DNXCORE50 #if !NETSTANDARDAPP1_5
public override void WriteByte(byte value) public override void WriteByte(byte value)
{ {
_writeStream.WriteByte(value); _writeStream.WriteByte(value);

View File

@ -6,11 +6,14 @@
}, },
"testRunner": "xunit", "testRunner": "xunit",
"frameworks": { "frameworks": {
"dnxcore50": { "netstandardapp1.5": {
"dependencies": { "dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*" "dotnet-test-xunit": "1.0.0-dev-*"
}, },
"imports": "portable-net451+win8" "imports": [
"dnxcore50",
"portable-net451+win8"
]
}, },
"net451": { "net451": {
"frameworkAssemblies": { "frameworkAssemblies": {
@ -21,5 +24,4 @@
} }
} }
} }
} }