Enable Microsoft.AspNet.WebSockets.Protocol.Test on CoreCLR.
This commit is contained in:
parent
187221fcd8
commit
f784b1bf43
|
|
@ -138,6 +138,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
}
|
||||
}
|
||||
|
||||
#if !DNXCORE50
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
{
|
||||
// TODO: This option doesn't preserve the state object.
|
||||
|
|
@ -197,6 +198,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
_readLock.Release();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Write with count 0 will still trigger OnFirstWrite
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
|
|
@ -224,6 +226,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
}
|
||||
}
|
||||
|
||||
#if !DNXCORE50
|
||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||
{
|
||||
Write(buffer, offset, count);
|
||||
|
|
@ -254,6 +257,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
Write(buffer, offset, count);
|
||||
return Task.FromResult<object>(null);
|
||||
}
|
||||
#endif
|
||||
|
||||
private static void VerifyBuffer(byte[] buffer, int offset, int count, bool allowEmpty)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
return _readStream.Read(buffer, offset, count);
|
||||
}
|
||||
|
||||
#if !DNXCORE50
|
||||
public override int ReadByte()
|
||||
{
|
||||
return _readStream.ReadByte();
|
||||
|
|
@ -117,6 +118,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
{
|
||||
return _readStream.CopyToAsync(destination, bufferSize, cancellationToken);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion Read
|
||||
|
||||
|
|
@ -127,6 +129,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
_writeStream.Write(buffer, offset, count);
|
||||
}
|
||||
|
||||
#if !DNXCORE50
|
||||
public override void WriteByte(byte value)
|
||||
{
|
||||
_writeStream.WriteByte(value);
|
||||
|
|
@ -147,15 +150,16 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
|
|||
return _writeStream.WriteAsync(buffer, offset, count, cancellationToken);
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
_writeStream.Flush();
|
||||
}
|
||||
|
||||
public override Task FlushAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
return _writeStream.FlushAsync(cancellationToken);
|
||||
}
|
||||
#endif
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
_writeStream.Flush();
|
||||
}
|
||||
|
||||
#endregion Write
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { }
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"System.IO": "4.0.11-beta-*"
|
||||
}
|
||||
},
|
||||
"commands": {
|
||||
"test": "xunit.runner.aspnet"
|
||||
|
|
|
|||
Loading…
Reference in New Issue