summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/util/test/UncloseableStream.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/crypto/test/src/util/test/UncloseableStream.cs b/crypto/test/src/util/test/UncloseableStream.cs
index 171198120..2a3b4229b 100644
--- a/crypto/test/src/util/test/UncloseableStream.cs
+++ b/crypto/test/src/util/test/UncloseableStream.cs
@@ -14,9 +14,21 @@ namespace Org.BouncyCastle.Utilities.Test
 		{
 		}
 
-		public override void Close()
+#if PORTABLE
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+			    throw new Exception("UncloseableStream was disposed");
+            }
+
+            base.Dispose(disposing);
+        }
+#else
+        public override void Close()
 		{
 			throw new Exception("Close() called on UncloseableStream");
 		}
-	}
+#endif
+    }
 }