亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sqlitefunction.cs

?? sqlite 3.3.8 支持加密的版本
?? CS
?? 第 1 頁 / 共 2 頁
字號:
        Exception r = returnValue as Exception;

        if (r != null)
        {
          _base.ReturnError(context, r.Message);
          return;
        }
      }

      switch (SQLiteConvert.TypeToAffinity(t))
      {
        case TypeAffinity.Null:
          _base.ReturnNull(context);
          return;
        case TypeAffinity.Int64:
          _base.ReturnInt64(context, Convert.ToInt64(returnValue, CultureInfo.CurrentCulture));
          return;
        case TypeAffinity.Double:
          _base.ReturnDouble(context, Convert.ToDouble(returnValue, CultureInfo.CurrentCulture));
          return;
        case TypeAffinity.Text:
          _base.ReturnText(context, returnValue.ToString());
          return;
        case TypeAffinity.Blob:
          _base.ReturnBlob(context, (byte[])returnValue);
          return;
      }
    }

    /// <summary>
    /// Internal scalar callback function, which wraps the raw context pointer and calls the virtual Invoke() method.
    /// </summary>
    /// <param name="context">A raw context pointer</param>
    /// <param name="nArgs">Number of arguments passed in</param>
    /// <param name="argsptr">A pointer to the array of arguments</param>
    internal void ScalarCallback(IntPtr context, int nArgs, IntPtr argsptr)
    {
      SetReturnValue(context, Invoke(ConvertParams(nArgs, argsptr)));
    }

    /// <summary>
    /// Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function.
    /// </summary>
    /// <param name="len1">Length of the string pv1</param>
    /// <param name="ptr1">Pointer to the first string to compare</param>
    /// <param name="len2">Length of the string pv2</param>
    /// <param name="ptr2">Pointer to the second string to compare</param>
    /// <returns>Returns -1 if the first string is less than the second.  0 if they are equal, or 1 if the first string is greater
    /// than the second.</returns>
    internal int CompareCallback(int len1, IntPtr ptr1, int len2, IntPtr ptr2)
    {
      return Compare(_base.ToString(ptr1, len1), _base.ToString(ptr2, len2));
    }

    /// <summary>
    /// The internal aggregate Step function callback, which wraps the raw context pointer and calls the virtual Step() method.
    /// </summary>
    /// <remarks>
    /// This function takes care of doing the lookups and getting the important information put together to call the Step() function.
    /// That includes pulling out the user's contextData and updating it after the call is made.  We use a sorted list for this so
    /// binary searches can be done to find the data.
    /// </remarks>
    /// <param name="context">A raw context pointer</param>
    /// <param name="nArgs">Number of arguments passed in</param>
    /// <param name="argsptr">A pointer to the array of arguments</param>
    internal void StepCallback(IntPtr context, int nArgs, IntPtr argsptr)
    {
      int n = _base.AggregateCount(context);
      long nAux;
      object obj = null;

      nAux = (long)_base.AggregateContext(context);
      if (n > 1) obj = _contextDataList[nAux];

      Step(ConvertParams(nArgs, argsptr), n, ref obj);
      _contextDataList[nAux] = obj;      
    }

    /// <summary>
    /// An internal aggregate Final function callback, which wraps the context pointer and calls the virtual Final() method.
    /// </summary>
    /// <param name="context">A raw context pointer</param>
    /// <param name="nArgs">Not used, always zero</param>
    /// <param name="argsptr">Not used, always zero</param>
    internal void FinalCallback(IntPtr context, int nArgs, IntPtr argsptr)
    {
      long n = (long)_base.AggregateContext(context);
      object obj = null;

      if (_contextDataList.ContainsKey(n))
      {
        obj = _contextDataList[n];
        _contextDataList.Remove(n);
      }

      SetReturnValue(context, Final(obj));

      IDisposable disp = obj as IDisposable;
      if (disp != null) disp.Dispose();
    }

    /// <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)
    {
    }

    /// <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);
    }

#if !PLATFORM_COMPACTFRAMEWORK
    /// <summary>
    /// Using reflection, enumerate all assemblies in the current appdomain looking for classes that
    /// have a SQLiteFunctionAttribute attribute, and registering them accordingly.
    /// </summary>
    static SQLiteFunction()
    {
      SQLiteFunctionAttribute at;
      System.Reflection.Assembly[] arAssemblies = System.AppDomain.CurrentDomain.GetAssemblies();
      int w = arAssemblies.Length;

      for (int n = 0; n < w; n++)
      {
        Type[] arTypes;
        try
        {
          arTypes = arAssemblies[n].GetTypes();
        }
        catch (Reflection.ReflectionTypeLoadException e)
        {
          arTypes = e.Types;
        }

        int v = arTypes.Length;
        for (int x = 0; x < v; x++)
        {
          if (arTypes[x] == null) continue;

          object[] arAtt = arTypes[x].GetCustomAttributes(typeof(SQLiteFunctionAttribute), false);
          int u = arAtt.Length;
          for (int y = 0; y < u; y++)
          {
            at = arAtt[y] as SQLiteFunctionAttribute;
            if (at != null)
            {
              at._instanceType = arTypes[x];
              _registeredFunctions.Add(at);
            }
          }
        }
      }
    }
#else
    /// <summary>
    /// Manual method of registering a function.  The type must still have the SQLiteFunctionAttributes in order to work
    /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.
    /// </summary>
    /// <param name="typ">The type of the function to register</param>
    public static void RegisterFunction(Type typ)
    {
      object[] arAtt = typ.GetCustomAttributes(typeof(SQLiteFunctionAttribute), false);
      int u = arAtt.Length;
      SQLiteFunctionAttribute at;

      for (int y = 0; y < u; y++)
      {
        at = arAtt[y] as SQLiteFunctionAttribute;
        if (at != null)
        {
          at._instanceType = typ;
          _registeredFunctions.Add(at);
        }
      }
    }
#endif

    /// <summary>
    /// Called by SQLiteBase derived classes, this function binds all user-defined functions to a connection.
    /// It is done this way so that all user-defined functions will access the database using the same encoding scheme
    /// as the connection (UTF-8 or UTF-16).
    /// </summary>
    /// <remarks>
    /// The wrapper functions that interop with SQLite will create a unique cooke value, which internally is a pointer to
    /// all the wrapped callback functions.  The interop function uses it to map CDecl callbacks to StdCall callbacks.
    /// </remarks>
    /// <param name="sqlbase">The base object on which the functions are to bind</param>
    /// <returns>Returns an array of functions which the connection object should retain until the connection is closed.</returns>
    internal static SQLiteFunction[] BindFunctions(SQLiteBase sqlbase)
    {
      SQLiteFunction f;
      List<SQLiteFunction> lFunctions = new List<SQLiteFunction>();

      foreach (SQLiteFunctionAttribute pr in _registeredFunctions)
      {
        f = (SQLiteFunction)Activator.CreateInstance(pr._instanceType);
        f._base = sqlbase;
        f._InvokeFunc = (pr.FuncType == FunctionType.Scalar) ? new SQLiteCallback(f.ScalarCallback) : null;
        f._StepFunc = (pr.FuncType == FunctionType.Aggregate) ? new SQLiteCallback(f.StepCallback) : null;
        f._FinalFunc = (pr.FuncType == FunctionType.Aggregate) ? new SQLiteCallback(f.FinalCallback) : null;
        f._CompareFunc = (pr.FuncType == FunctionType.Collation) ? new SQLiteCollation(f.CompareCallback) : null;

        if (pr.FuncType != FunctionType.Collation)
          f._interopCookie = sqlbase.CreateFunction(pr.Name, pr.Arguments, f._InvokeFunc, f._StepFunc, f._FinalFunc);
        else
          f._interopCookie = sqlbase.CreateCollation(pr.Name, f._CompareFunc);


        lFunctions.Add(f);
      }

      SQLiteFunction[] arFunctions = new SQLiteFunction[lFunctions.Count];
      lFunctions.CopyTo(arFunctions, 0);

      return arFunctions;
    }

    /// <summary>
    /// Issued after the base connection is closed, this function cleans up all user-defined functions and disposes of them.
    /// </summary>
    /// <remarks>
    /// Cleaning up here is done mainly because of the interop wrapper.  It allocated memory to hold a reference to all the
    /// delegates, and now must free that memory.
    /// Freeing is done after the connection is closed to ensure no callbacks get hit after we've freed the cookie.
    /// </remarks>
    /// <param name="sqlbase">The base SQLite connection object</param>
    /// <param name="ar">An array of user-defined functions for this object</param>
    internal static void UnbindFunctions(SQLiteBase sqlbase, SQLiteFunction[] ar)
    {
      if (ar == null) return;

      int x = ar.Length;
      for (int n = 0; n < x; n++)
      {
        sqlbase.FreeFunction(ar[n]._interopCookie);
        ar[n].Dispose();
      }
    }
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区不卡在线| 亚洲国产日韩精品| 国产精品夫妻自拍| 日韩黄色免费网站| 美女视频网站久久| 日韩和欧美一区二区| 亚洲午夜私人影院| 亚洲a一区二区| 欧美色老头old∨ideo| 国产成人av电影| 国产精品影视在线观看| 丁香婷婷综合五月| 在线观看欧美日本| 亚洲精品一区二区三区影院| 亚洲欧美偷拍另类a∨色屁股| 国产乱人伦精品一区二区在线观看 | 奇米影视在线99精品| 一区二区三区中文字幕| 亚洲午夜精品17c| jizz一区二区| 日韩亚洲欧美成人一区| 国产精品毛片a∨一区二区三区| 亚洲欧美视频在线观看视频| 麻豆精品一区二区av白丝在线| 国产成人综合亚洲91猫咪| 不卡一区在线观看| 综合网在线视频| 亚洲国产精品成人综合色在线婷婷 | 国产精品色哟哟| 成人免费高清在线| 六月丁香婷婷色狠狠久久| 国产激情一区二区三区四区| 国产精品99精品久久免费| 成人网男人的天堂| 日韩免费一区二区三区在线播放| 日韩精品每日更新| 夜色激情一区二区| 久久99久久99| 国产精品伊人色| 一本色道久久加勒比精品| 奇米亚洲午夜久久精品| 亚洲综合av网| aaa亚洲精品一二三区| 欧美综合天天夜夜久久| 欧美精品一区二区三区高清aⅴ | 色综合久久天天| 久久激情五月婷婷| 国产一区在线观看视频| 亚洲精品第1页| 国产精品久久久久久久蜜臀| 久久这里只有精品6| 国产美女一区二区三区| 欧美激情一区不卡| 欧美xfplay| 亚洲欧美另类综合偷拍| 日韩欧美在线1卡| 91麻豆自制传媒国产之光| 91精品1区2区| 91麻豆精品秘密| 国产专区欧美精品| 成人美女在线观看| 欧美日韩高清一区二区三区| 日韩精品自拍偷拍| 精品国产一区二区亚洲人成毛片| 国产清纯在线一区二区www| 日本成人超碰在线观看| 久久综合色婷婷| 亚洲欧美日韩精品久久久久| 中文字幕欧美国产| 色伊人久久综合中文字幕| 99精品视频一区| 欧美色图天堂网| 成人黄色国产精品网站大全在线免费观看 | 一区二区三区中文字幕| 欧美美女bb生活片| 精品久久久久久久人人人人传媒 | 国产一本一道久久香蕉| 免费成人你懂的| 国产精品正在播放| 欧美日韩你懂的| 国产精品久久久久久亚洲伦| 视频一区二区三区中文字幕| 成人综合激情网| 日韩一级欧美一级| 视频一区二区不卡| 国产欧美日本一区二区三区| 日韩视频永久免费| 99久久精品免费看国产| 国产精品久久久久久久久晋中| 不卡免费追剧大全电视剧网站| 国产成人免费视频精品含羞草妖精| 欧美日产在线观看| 激情欧美日韩一区二区| 欧美视频自拍偷拍| 香蕉av福利精品导航| 亚洲成人av电影| 日韩电影在线免费| 欧美久久一二三四区| 国内久久精品视频| 免费久久99精品国产| 国产精品成人网| 国产精品一区一区| 日韩欧美一二三| 精品一二三四在线| 久久一区二区视频| 日韩电影在线一区二区| 欧美人伦禁忌dvd放荡欲情| 久久色在线视频| 日韩理论片一区二区| 亚洲欧洲无码一区二区三区| 一区二区三区在线视频免费观看| 亚洲精品高清在线| 久久不见久久见中文字幕免费| 欧美日韩精品久久久| 久久精品国产久精国产| 久久久精品2019中文字幕之3| 18欧美乱大交hd1984| 国产精品夜夜嗨| 最新日韩在线视频| 制服.丝袜.亚洲.中文.综合| 国产综合久久久久影院| 成人免费在线观看入口| 亚洲一卡二卡三卡四卡无卡久久| 久久精品视频免费| 国产高清久久久久| 亚洲一区二区视频在线观看| 欧美国产一区视频在线观看| 欧美日韩国产美女| 日韩一区二区三区免费观看| 国产成人午夜精品影院观看视频 | 亚洲视频一区二区免费在线观看| 色呦呦国产精品| 老司机一区二区| 亚洲激情在线激情| 国产精品人人做人人爽人人添| 日韩无一区二区| 91.成人天堂一区| 色偷偷88欧美精品久久久| 国产精品99久| 亚洲婷婷综合色高清在线| 欧美高清www午色夜在线视频| 伊人婷婷欧美激情| 国产精品进线69影院| 麻豆精品国产91久久久久久| 精品一区二区三区在线观看 | 97精品电影院| 在线日韩av片| 中文字幕一区二区三区精华液 | 中文字幕一区免费在线观看| 久久久精品国产免大香伊| 岛国一区二区在线观看| 国产精品萝li| 国产高清不卡一区| 日韩一区二区在线观看视频 | 激情小说欧美图片| 日韩综合小视频| 亚洲国产精品成人综合色在线婷婷| 国产精品嫩草99a| 色综合久久综合| 国产69精品一区二区亚洲孕妇| 日本一区二区三区四区在线视频 | 日韩欧美的一区| 亚洲精品国产一区二区精华液 | 免费人成黄页网站在线一区二区| 精品久久久久久无| 国产在线精品国自产拍免费| 亚洲最大的成人av| 久久国产福利国产秒拍| 五月激情综合网| 亚洲超碰精品一区二区| 亚洲精品国产视频| 蜜臀99久久精品久久久久久软件| 欧美成人三级电影在线| 欧美午夜影院一区| 欧美日韩一区二区不卡| 成人精品免费看| 97se亚洲国产综合自在线不卡| 成人视屏免费看| 北条麻妃一区二区三区| 欧美日韩午夜精品| 欧美不卡在线视频| 国产精品美女久久久久久久 | 亚洲欧洲精品天堂一级 | 26uuu精品一区二区三区四区在线| 欧美午夜精品一区二区蜜桃| 这里是久久伊人| 国产欧美日本一区二区三区| 一区二区三区日韩欧美精品| 麻豆91免费观看| av资源站一区| 欧美另类一区二区三区| 国产午夜精品福利| 亚洲一区二区四区蜜桃| 国产高清一区日本| 51精品国自产在线| 国产精品久久久久久久久晋中| 日韩avvvv在线播放| 成人av网址在线观看| 日韩一区二区三免费高清| 国产精品久久久久一区二区三区|