summary refs log tree commit diff
path: root/crypto/src/util/io/PushbackStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/io/PushbackStream.cs')
-rw-r--r--crypto/src/util/io/PushbackStream.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/src/util/io/PushbackStream.cs b/crypto/src/util/io/PushbackStream.cs
index be6b26d4c..452019805 100644
--- a/crypto/src/util/io/PushbackStream.cs
+++ b/crypto/src/util/io/PushbackStream.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
 {
@@ -28,6 +30,7 @@ namespace Org.BouncyCastle.Utilities.IO
         }
 #endif
 
+#if NETCOREAPP1_0_OR_GREATER || NET45_OR_GREATER || NETSTANDARD1_0_OR_GREATER
         public override async Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
         {
             if (m_buf != -1)
@@ -39,6 +42,7 @@ namespace Org.BouncyCastle.Utilities.IO
 
             await Streams.CopyToAsync(s, destination, bufferSize, cancellationToken);
         }
+#endif
 
         public override int Read(byte[] buffer, int offset, int count)
 		{