Ejemplo n.º 1
0
 public static bool Success(IntPtr handle, yajl_status code)
 {
     switch (code) {
     case yajl_status.yajl_status_ok:
         return true;
     case yajl_status.yajl_status_client_canceled:
         return false;
     default:
         IntPtr str = yajl_get_error(handle, 1, IntPtr.Zero, IntPtr.Zero);
         var exp = new Exception(Marshal.PtrToStringAuto(str));
         yajl_free_error(handle, str);
         throw exp;
     }
 }
Ejemplo n.º 2
0
        public static bool Success(IntPtr handle, yajl_status code)
        {
            switch (code)
            {
            case yajl_status.yajl_status_ok:
                return(true);

            case yajl_status.yajl_status_client_canceled:
                return(false);

            default:
                IntPtr str = yajl_get_error(handle, 1, IntPtr.Zero, IntPtr.Zero);
                var    exp = new Exception(Marshal.PtrToStringAuto(str));
                yajl_free_error(handle, str);
                throw exp;
            }
        }
Ejemplo n.º 3
0
 static string GetString(yajl_status code)
 {
     return(new string(yajl_status_to_string(code)));
 }
Ejemplo n.º 4
0
 static extern sbyte *yajl_status_to_string(yajl_status code);
Ejemplo n.º 5
0
 static string GetString(yajl_status code)
 {
     return new string(yajl_status_to_string(code));
 }
Ejemplo n.º 6
0
 static extern sbyte *yajl_status_to_string(yajl_status code);