Revert "React to CoreFxLab changes (#225)"

This reverts commit 28455f647e.
This commit is contained in:
David Fowler 2017-02-20 00:31:06 -08:00
parent 28455f647e
commit f9529f00b9
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Sockets
// Write the length as a string // Write the length as a string
int written = 0; int written = 0;
if (!length.TryFormat(buffer, out int lengthLen, default(TextFormat), TextEncoder.Utf8)) if (!length.TryFormat(buffer, out int lengthLen, default(TextFormat), EncodingData.InvariantUtf8))
{ {
bytesWritten = 0; bytesWritten = 0;
return false; return false;
@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.Sockets
buffer = buffer.Slice(colonIndex); buffer = buffer.Slice(colonIndex);
// Parse the length // Parse the length
if (!PrimitiveParser.TryParseInt32(lengthSpan, out var length, out var consumedByLength, encoder: TextEncoder.Utf8) || consumedByLength < lengthSpan.Length) if (!PrimitiveParser.TryParseInt32(lengthSpan, out var length, out var consumedByLength, encoding: EncodingData.InvariantUtf8) || consumedByLength < lengthSpan.Length)
{ {
message = default(Message); message = default(Message);
bytesConsumed = 0; bytesConsumed = 0;

View File

@ -71,7 +71,7 @@ namespace Microsoft.Extensions.WebSockets.Internal
buffer.WriteBigEndian((ushort)Status); buffer.WriteBigEndian((ushort)Status);
if (!string.IsNullOrEmpty(Description)) if (!string.IsNullOrEmpty(Description))
{ {
buffer.Append(Description, TextEncoder.Utf8); buffer.Append(Description, EncodingData.InvariantUtf8);
} }
} }
} }