React to CoreFxLab changes (#225)

This commit is contained in:
Pranav K 2017-02-19 23:41:19 -08:00 committed by David Fowler
parent 6f33ebc1f5
commit 28455f647e
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
int written = 0;
if (!length.TryFormat(buffer, out int lengthLen, default(TextFormat), EncodingData.InvariantUtf8))
if (!length.TryFormat(buffer, out int lengthLen, default(TextFormat), TextEncoder.Utf8))
{
bytesWritten = 0;
return false;
@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.Sockets
buffer = buffer.Slice(colonIndex);
// Parse the length
if (!PrimitiveParser.TryParseInt32(lengthSpan, out var length, out var consumedByLength, encoding: EncodingData.InvariantUtf8) || consumedByLength < lengthSpan.Length)
if (!PrimitiveParser.TryParseInt32(lengthSpan, out var length, out var consumedByLength, encoder: TextEncoder.Utf8) || consumedByLength < lengthSpan.Length)
{
message = default(Message);
bytesConsumed = 0;

View File

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