Update Dependencies and support NS2.0 builds (#1046)

* Update deps, fix test warnings.

* Support ns2.0

* Fix typo

* Remove ns1.1 support

* Net.Http and Net.Websockets.Client are not needed in ns2.0

* Move to net46 per volt

* Remove ns1.3 constants
This commit is contained in:
Hawx
2018-05-25 20:14:28 +08:00
committed by Christopher F
parent 5f084adf94
commit bbbac85c46
42 changed files with 135 additions and 229 deletions

View File

@@ -1,4 +1,3 @@
#if DEFAULTWEBSOCKET
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -209,14 +208,9 @@ namespace Discord.Net.WebSockets
//Use the internal buffer if we can get it
resultCount = (int)stream.Length;
#if MSTRYBUFFER
if (stream.TryGetBuffer(out var streamBuffer))
result = streamBuffer.Array;
else
result = stream.ToArray();
#else
result = stream.GetBuffer();
#endif
result = stream.TryGetBuffer(out var streamBuffer) ? streamBuffer.Array : stream.ToArray();
}
}
else
@@ -248,4 +242,3 @@ namespace Discord.Net.WebSockets
}
}
}
#endif