From 4ceed817a326feac67b715dc531f12394397c9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Rosiek?= Date: Wed, 31 May 2017 20:10:01 +0200 Subject: [PATCH] Removed unused methods --- .../HostingModels/HttpNodeInstance.cs | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs b/src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs index 8dd896b..a87e3d3 100644 --- a/src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs +++ b/src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs @@ -21,7 +21,6 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels /// internal class HttpNodeInstance : OutOfProcessNodeInstance { - private readonly static int streamBufferSize = 16 * 1024; private static readonly Regex PortMessageRegex = new Regex(@"^\[Microsoft.AspNetCore.NodeServices.HttpNodeHost:Listening on port (\d+)\]$"); @@ -140,28 +139,6 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels } } - private static async Task ReadJsonAsync(Stream stream, CancellationToken cancellationToken) - { - var json = Encoding.UTF8.GetString(await ReadAllBytesAsync(stream, cancellationToken)); - return JsonConvert.DeserializeObject(json, jsonSerializerSettings); - } - - private static async Task ReadAllBytesAsync(Stream input, CancellationToken cancellationToken) - { - byte[] buffer = new byte[streamBufferSize]; - - using (var ms = new MemoryStream()) - { - int read; - while ((read = await input.ReadAsync(buffer, 0, buffer.Length, cancellationToken)) > 0) - { - ms.Write(buffer, 0, read); - } - - return ms.ToArray(); - } - } - #pragma warning disable 649 // These properties are populated via JSON deserialization private class RpcJsonResponse {