Diff of /System.Data.SQLite/SQLiteStatementHandle.cs [000000] .. [8e2213] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/System.Data.SQLite/SQLiteStatementHandle.cs
@@ -0,0 +1,48 @@
+ďťżusing System.Runtime.InteropServices;
+
+namespace System.Data.SQLite
+{
+    /// <summary>
+    /// Provides finalization support for unmanaged SQLite statements.
+    /// </summary>
+    internal class SQLiteStatementHandle : CriticalHandle
+    {
+        public static implicit operator IntPtr(SQLiteStatementHandle stmt)
+        {
+            return stmt.handle;
+        }
+
+        public static implicit operator SQLiteStatementHandle(IntPtr stmt)
+        {
+            return new SQLiteStatementHandle(stmt);
+        }
+
+        private SQLiteStatementHandle(IntPtr stmt)
+            : this()
+        {
+            SetHandle(stmt);
+        }
+
+        internal SQLiteStatementHandle()
+            : base(IntPtr.Zero)
+        {
+        }
+
+        protected override bool ReleaseHandle()
+        {
+            try
+            {
+                SQLiteBase.FinalizeStatement(this);
+            }
+            catch (SQLiteException)
+            {
+            }
+            return true;
+        }
+
+        public override bool IsInvalid
+        {
+            get { return (handle == IntPtr.Zero); }
+        }
+    }
+}