From 176743ab5faec2dd275b5efd3a2dd62c610f237a Mon Sep 17 00:00:00 2001 From: Oren Novotny Date: Wed, 26 Feb 2014 10:08:50 -0500 Subject: Add BouncyCastle PCL files --- Crypto/src/openpgp/WrappedGeneratorStream.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Crypto/src/openpgp/WrappedGeneratorStream.cs (limited to 'Crypto/src/openpgp/WrappedGeneratorStream.cs') diff --git a/Crypto/src/openpgp/WrappedGeneratorStream.cs b/Crypto/src/openpgp/WrappedGeneratorStream.cs new file mode 100644 index 000000000..baad0d429 --- /dev/null +++ b/Crypto/src/openpgp/WrappedGeneratorStream.cs @@ -0,0 +1,28 @@ +using System.IO; + +using Org.BouncyCastle.Asn1.Utilities; + +namespace Org.BouncyCastle.Bcpg.OpenPgp +{ + public class WrappedGeneratorStream + : FilterStream + { + private readonly IStreamGenerator gen; + + public WrappedGeneratorStream( + IStreamGenerator gen, + Stream str) + : base(str) + { + this.gen = gen; + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + gen.Close(); + } + } + } +} -- cgit 1.5.1