From 76c38f2f55851a3e8669ac6b5f872ac8d16e38e0 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Thu, 24 May 2018 11:38:24 -0400 Subject: [PATCH 1/2] Bump to head of mono 2018-02 which includes the removal of Span --- external/mono | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/mono b/external/mono index f2381f329aac..c22f532871c3 160000 --- a/external/mono +++ b/external/mono @@ -1 +1 @@ -Subproject commit f2381f329aac2f2d35ffe1bd2b1ed51d683726e7 +Subproject commit c22f532871c364fac35bd810d23e253b43540acf From cd63ed19263b48aa7fa61f2ff3321cc4a183e498 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Thu, 24 May 2018 13:36:16 -0400 Subject: [PATCH 2/2] [compression] Hide API using Span until it's back (publicly) in mono --- src/Compression/Compression.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Compression/Compression.cs b/src/Compression/Compression.cs index 0631c34fb4a4..f0e8b778c0eb 100644 --- a/src/Compression/Compression.cs +++ b/src/Compression/Compression.cs @@ -202,7 +202,8 @@ public override int Read (byte[] array, int offset, int count) return ReadCore (new Span (array, offset, count)); } - public override int Read (Span destination) + // FIXME needs Span + internal override int Read (Span destination) { if (GetType () != typeof (CompressionStream)) { // CompressStream is not sealed, and a derived type may have overridden Read(byte[], int, int) prior @@ -312,7 +313,8 @@ public override Task ReadAsync (byte[] array, int offset, int count, Cancel return ReadAsyncMemory (new Memory(array, offset, count), cancellationToken).AsTask (); } - public override ValueTask ReadAsync (Memory destination, CancellationToken cancellationToken = default(CancellationToken)) + // FIXME needs Span + internal override ValueTask ReadAsync (Memory destination, CancellationToken cancellationToken = default(CancellationToken)) { if (GetType () != typeof (CompressionStream)) { // Ensure that existing streams derived from DeflateStream and that override ReadAsync(byte[],...) @@ -405,7 +407,8 @@ public override void Write (byte[] array, int offset, int count) WriteCore (new ReadOnlySpan (array, offset, count)); } - public override void Write (ReadOnlySpan source) + // FIXME needs Span + internal override void Write (ReadOnlySpan source) { if (GetType () != typeof (CompressionStream)) { // DeflateStream is not sealed, and a derived type may have overridden Write(byte[], int, int) prior @@ -558,7 +561,8 @@ public override Task WriteAsync (byte[] array, int offset, int count, Cancellati return WriteAsyncMemory (new ReadOnlyMemory (array, offset, count), cancellationToken); } - public override Task WriteAsync (ReadOnlyMemory source, CancellationToken cancellationToken) + // FIXME needs Span + internal override Task WriteAsync (ReadOnlyMemory source, CancellationToken cancellationToken) { if (GetType () != typeof (CompressionStream)) { // Ensure that existing streams derived from DeflateStream and that override WriteAsync(byte[],...)