Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && BaseInputStream != null)
     {
         BaseInputStream.Dispose();
         BaseInputStream = null;
     }
 }
Exemplo n.º 2
0
 //
 // Exception audit:
 //
 //  Verdict
 //    Exception wrapping is required.
 //
 //  Rationale
 //    `java.io.InputStream.close()` throws an exception, see:
 //
 //     https://developer.android.com/reference/java/io/InputStream?hl=en
 //
 protected override void Dispose(bool disposing)
 {
     if (disposing && BaseInputStream != null)
     {
         try {
             BaseInputStream.Close();
             BaseInputStream.Dispose();
             BaseInputStream = null;
         } catch (Java.IO.IOException ex) when(JNIEnv.ShouldWrapJavaException(ex))
         {
             throw new IOException(ex.Message, ex);
         }
     }
 }