summary refs log tree commit diff
path: root/crypto/src/openpgp/WrappedGeneratorStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/openpgp/WrappedGeneratorStream.cs')
-rw-r--r--crypto/src/openpgp/WrappedGeneratorStream.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/src/openpgp/WrappedGeneratorStream.cs b/crypto/src/openpgp/WrappedGeneratorStream.cs
index cdc9befb3..ffa199255 100644
--- a/crypto/src/openpgp/WrappedGeneratorStream.cs
+++ b/crypto/src/openpgp/WrappedGeneratorStream.cs
@@ -17,9 +17,21 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 			this.gen = gen;
 		}
 
+#if PORTABLE
+        protected override void Disposing(bool disposing)
+        {
+            if (disposing)
+            {
+                gen.Close();
+                return;
+            }
+            base.Dispose(disposing);
+        }
+#else
 		public override void Close()
 		{
 			gen.Close();
 		}
+#endif
 	}
 }