示例#1
0
文件: SQLite3.cs 项目: bdcliang/BD
        internal override CollationSequence GetCollationSequence(SQLiteFunction func, IntPtr context)
        {
            int num;
            int num2;
            int num3;
            CollationSequence sequence     = new CollationSequence();
            IntPtr            nativestring = UnsafeNativeMethods.sqlite3_context_collseq(context, out num2, out num3, out num);

            sequence.Name     = SQLiteConvert.UTF8ToString(nativestring, num);
            sequence.Type     = (CollationTypeEnum)num2;
            sequence._func    = func;
            sequence.Encoding = (CollationEncodingEnum)num3;
            return(sequence);
        }
示例#2
0
        internal override CollationSequence GetCollationSequence(SQLiteFunction func, IntPtr context)
        {
#if !SQLITE_STANDARD
            CollationSequence seq = new CollationSequence();
            int    len;
            int    type;
            int    enc;
            IntPtr p = UnsafeNativeMethods.sqlite3_context_collseq(context, out type, out enc, out len);

            if (p != null)
            {
                seq.Name = UTF8ToString(p, len);
            }
            seq.Type     = (CollationTypeEnum)type;
            seq._func    = func;
            seq.Encoding = (CollationEncodingEnum)enc;

            return(seq);
#else
            throw new NotImplementedException();
#endif
        }
示例#3
0
    internal override CollationSequence GetCollationSequence(SQLiteFunction func, IntPtr context)
    {
#if !SQLITE_STANDARD
      CollationSequence seq = new CollationSequence();
      int len;
      int type;
      int enc;
      IntPtr p = UnsafeNativeMethods.sqlite3_context_collseq(context, out type, out enc, out len);

      if (p != null) seq.Name = UTF8ToString(p, len);
      seq.Type = (CollationTypeEnum)type;
      seq._func = func;
      seq.Encoding = (CollationEncodingEnum)enc;

      return seq;
#else
      throw new NotImplementedException();
#endif
    }