summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpLiteralDataGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/openpgp/PgpLiteralDataGenerator.cs')
-rw-r--r--crypto/src/openpgp/PgpLiteralDataGenerator.cs26
1 files changed, 7 insertions, 19 deletions
diff --git a/crypto/src/openpgp/PgpLiteralDataGenerator.cs b/crypto/src/openpgp/PgpLiteralDataGenerator.cs
index fd59c1ebe..8fbed23d5 100644
--- a/crypto/src/openpgp/PgpLiteralDataGenerator.cs
+++ b/crypto/src/openpgp/PgpLiteralDataGenerator.cs
@@ -162,27 +162,15 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 			return Open(outStr, format, file.Name, file.Length, file.LastWriteTime);
         }
 
-        #region IDisposable
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        protected virtual void Dispose(bool disposing)
-        {
-            if (disposing)
+        [Obsolete("Dispose any opened Stream directly")]
+        public void Close()
+		{
+            if (pkOut != null)
             {
-                if (pkOut != null)
-                {
-                    pkOut.Finish();
-                    pkOut.Flush();
-                    pkOut = null;
-                }
+                pkOut.Finish();
+                pkOut.Flush();
+                pkOut = null;
             }
         }
-
-        #endregion
 	}
 }