From fd335142a7a492509dda827ee2b6507a651560b8 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 11 Apr 2023 14:44:47 +0700 Subject: Platform guards for Stream code --- crypto/src/util/io/BaseOutputStream.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crypto/src/util/io/BaseOutputStream.cs') diff --git a/crypto/src/util/io/BaseOutputStream.cs b/crypto/src/util/io/BaseOutputStream.cs index 87a850c35..72234b817 100644 --- a/crypto/src/util/io/BaseOutputStream.cs +++ b/crypto/src/util/io/BaseOutputStream.cs @@ -1,7 +1,9 @@ using System; using System.IO; using System.Threading; +#if NETCOREAPP1_0_OR_GREATER || NET45_OR_GREATER || NETSTANDARD1_0_OR_GREATER using System.Threading.Tasks; +#endif namespace Org.BouncyCastle.Utilities.IO { @@ -16,11 +18,15 @@ namespace Org.BouncyCastle.Utilities.IO // TODO[api] sealed public override void CopyTo(Stream destination, int bufferSize) { throw new NotSupportedException(); } #endif + +#if NETCOREAPP1_0_OR_GREATER || NET45_OR_GREATER || NETSTANDARD1_0_OR_GREATER // TODO[api] sealed public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) { throw new NotSupportedException(); } +#endif + public override void Flush() {} public sealed override long Length { get { throw new NotSupportedException(); } } public sealed override long Position -- cgit 1.5.1