Ejemplo n.º 1
0
        /// <summary>
        /// Disposes of any active contextData variables that were not automatically cleaned up.  Sometimes this can happen if
        /// someone closes the connection while a DataReader is open.
        /// </summary>
        public void Dispose()
        {
            Dispose(true);

            IDisposable disp;

            foreach (KeyValuePair <long, object> kv in _contextDataList)
            {
                disp = kv.Value as IDisposable;
                if (disp != null)
                {
                    disp.Dispose();
                }
            }
            _contextDataList.Clear();

            _InvokeFunc      = null;
            _StepFunc        = null;
            _FinalFunc       = null;
            _CompareFunc     = null;
            _base            = null;
            _contextDataList = null;

            GC.SuppressFinalize(this);
        }
Ejemplo n.º 2
0
        internal override void CreateFunction(string strFunction, int nArgs, SqliteCallback func, SqliteCallback funcstep, SqliteFinalCallback funcfinal)
        {
            int n = UnsafeNativeMethods.sqlite3_create_function16(_sql, strFunction, nArgs, 4, IntPtr.Zero, func, funcstep, funcfinal);

            if (n > 0)
            {
                throw new SqliteException(n, SqliteLastError());
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Placeholder for a user-defined disposal routine
        /// </summary>
        /// <param name="disposing">True if the object is being disposed explicitly</param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                IDisposable disp;

                foreach (KeyValuePair <SqliteValueHandle, AggregateData> kv in _contextDataList)
                {
                    disp = kv.Value._data as IDisposable;
                    if (disp != null)
                    {
                        disp.Dispose();
                    }
                }
                _contextDataList.Clear();

                _InvokeFunc      = null;
                _StepFunc        = null;
                _FinalFunc       = null;
                _CompareFunc     = null;
                _base            = null;
                _contextDataList = null;
            }
        }
Ejemplo n.º 4
0
 internal abstract void  CreateFunction(string strFunction, int nArgs, SqliteCallback func, SqliteCallback funcstep, SqliteFinalCallback funcfinal);
Ejemplo n.º 5
0
 internal abstract void CreateFunction(string strFunction, int nArgs, bool needCollSeq, SqliteCallback func,
                                       SqliteCallback funcstep, SqliteFinalCallback funcfinal);
Ejemplo n.º 6
0
 internal override void CreateFunction(string strFunction, int nArgs, SqliteCallback func, SqliteCallback funcstep, SqliteFinalCallback funcfinal)
 {
   int n = UnsafeNativeMethods.sqlite3_create_function16(_sql, strFunction, nArgs, 4, IntPtr.Zero, func, funcstep, funcfinal);
   if (n > 0) throw new SqliteException(n, SqliteLastError());
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Placeholder for a user-defined disposal routine
        /// </summary>
        /// <param name="disposing">True if the object is being disposed explicitly</param>
        protected virtual void Dispose(bool disposing) {
            if (disposing) {
                IDisposable disp;

                foreach (KeyValuePair<SqliteValueHandle, AggregateData> kv in _contextDataList) {
                    disp = kv.Value._data as IDisposable;
                    if (disp != null)
                        disp.Dispose();
                }
                _contextDataList.Clear();

                _InvokeFunc = null;
                _StepFunc = null;
                _FinalFunc = null;
                _CompareFunc = null;
                _base = null;
                _contextDataList = null;
            }
        }
Ejemplo n.º 8
0
 internal static extern int sqlite3_create_function16(IntPtr db, string strName, int nArgs, int eTextRep, IntPtr app, SqliteCallback func, SqliteCallback funcstep, SqliteFinalCallback funcfinal);
Ejemplo n.º 9
0
    /// <summary>
    /// Disposes of any active contextData variables that were not automatically cleaned up.  Sometimes this can happen if
    /// someone closes the connection while a DataReader is open.
    /// </summary>
    public void Dispose()
    {
      Dispose(true);

      IDisposable disp;

      foreach (KeyValuePair<long, object> kv in _contextDataList)
      {
        disp = kv.Value as IDisposable;
        if (disp != null)
          disp.Dispose();
      }
      _contextDataList.Clear();

      _InvokeFunc = null;
      _StepFunc = null;
      _FinalFunc = null;
      _CompareFunc = null;
      _base = null;
      _contextDataList = null;

      GC.SuppressFinalize(this);
    }
Ejemplo n.º 10
0
 internal static extern int sqlite3_create_function16(IntPtr db, string strName, int nArgs, int eTextRep, IntPtr app, SqliteCallback func, SqliteCallback funcstep, SqliteFinalCallback funcfinal);
Ejemplo n.º 11
0
 internal static extern int sqlite3_create_function(IntPtr db, byte[] strName, int nArgs, int eTextRep, IntPtr app, SqliteCallback func, SqliteCallback fstep, SqliteFinalCallback ffinal);
Ejemplo n.º 12
0
 internal static extern int sqlite3_create_function(IntPtr db, byte[] strName, int nArgs, int eTextRep, IntPtr app, SqliteCallback func, SqliteCallback fstep, SqliteFinalCallback ffinal);