private static long ToInt649(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle provider)
        {
            // (Lsystem/IFormatProvider;)J
            // (LSystem/IFormatProvider;)J
            global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
            long @__return = default(long);

            try {
                global::System.IConvertible @__real = global::net.sf.jni4net.utils.Convertor.FullJ2C <global::System.IConvertible>(@__env, @__obj);
                @__return = ((long)(@__real.ToInt64(global::net.sf.jni4net.utils.Convertor.FullJ2C <global::System.IFormatProvider>(@__env, provider))));
            }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
            return(@__return);
        }
Exemple #2
0
        public static bool eq(object v1, object v2)
        {
            if (global::System.Object.ReferenceEquals(((object)(v1)), ((object)(v2))))
            {
                return(true);
            }

            if ((global::System.Object.ReferenceEquals(((object)(v1)), default(object)) || global::System.Object.ReferenceEquals(((object)(v2)), default(object))))
            {
                return(false);
            }

            global::System.IConvertible v1c = ((global::System.IConvertible)((v1 as global::System.IConvertible)));
            if ((v1c != null))
            {
                global::System.IConvertible v2c = ((global::System.IConvertible)((v2 as global::System.IConvertible)));
                if ((v2c == null))
                {
                    return(false);
                }

                global::System.TypeCode t1 = v1c.GetTypeCode();
                global::System.TypeCode t2 = v2c.GetTypeCode();
                if ((t1 == t2))
                {
                    return(global::System.Object.Equals(((object)(v1c)), ((object)(v2c))));
                }

                if (((t1 == global::System.TypeCode.String) || (t2 == global::System.TypeCode.String)))
                {
                    return(false);
                }

                switch (t1)
                {
                case global::System.TypeCode.Int64:
                {
                    switch (t2)
                    {
                    case global::System.TypeCode.Int64:
                    case global::System.TypeCode.UInt64:
                    case global::System.TypeCode.Single:
                    case global::System.TypeCode.Double:
                    case global::System.TypeCode.DateTime:
                    {
                        return(((long)(v1c.ToInt64(default(global::System.IFormatProvider)))) == ((long)(v2c.ToInt64(default(global::System.IFormatProvider)))));
                    }


                    case global::System.TypeCode.Decimal:
                    {
                        return(v1c.ToDecimal(default(global::System.IFormatProvider)).Equals(v2c.ToDecimal(default(global::System.IFormatProvider))));
                    }


                    default:
                    {
                        return(((long)(v1c.ToInt64(default(global::System.IFormatProvider)))) == ((long)(v2c.ToInt64(default(global::System.IFormatProvider)))));
                    }
                    }
                }


                case global::System.TypeCode.Single:
                case global::System.TypeCode.Double:
                {
                    switch (t2)
                    {
                    case global::System.TypeCode.Int64:
                    {
                        return(((long)(v1c.ToInt64(default(global::System.IFormatProvider)))) == ((long)(v2c.ToInt64(default(global::System.IFormatProvider)))));
                    }


                    case global::System.TypeCode.Single:
                    case global::System.TypeCode.Double:
                    {
                        return(v1c.ToDouble(default(global::System.IFormatProvider)) == v2c.ToDouble(default(global::System.IFormatProvider)));
                    }


                    case global::System.TypeCode.Decimal:
                    {
                        return(v1c.ToDecimal(default(global::System.IFormatProvider)).Equals(v2c.ToDecimal(default(global::System.IFormatProvider))));
                    }


                    case global::System.TypeCode.UInt64:
                    case global::System.TypeCode.DateTime:
                    {
                        return(v1c.ToUInt64(default(global::System.IFormatProvider)) == v2c.ToUInt64(default(global::System.IFormatProvider)));
                    }


                    default:
                    {
                        return(v1c.ToDouble(default(global::System.IFormatProvider)) == v2c.ToDouble(default(global::System.IFormatProvider)));
                    }
                    }
                }


                case global::System.TypeCode.Decimal:
                {
                    return(v1c.ToDecimal(default(global::System.IFormatProvider)).Equals(v2c.ToDecimal(default(global::System.IFormatProvider))));
                }


                case global::System.TypeCode.UInt64:
                case global::System.TypeCode.DateTime:
                {
                    switch (t2)
                    {
                    case global::System.TypeCode.Int64:
                    {
                        return(((long)(v1c.ToInt64(default(global::System.IFormatProvider)))) == ((long)(v2c.ToInt64(default(global::System.IFormatProvider)))));
                    }


                    case global::System.TypeCode.UInt64:
                    case global::System.TypeCode.Single:
                    case global::System.TypeCode.Double:
                    case global::System.TypeCode.DateTime:
                    {
                        return(v1c.ToUInt64(default(global::System.IFormatProvider)) == v2c.ToUInt64(default(global::System.IFormatProvider)));
                    }


                    case global::System.TypeCode.Decimal:
                    {
                        return(v1c.ToDecimal(default(global::System.IFormatProvider)).Equals(v2c.ToDecimal(default(global::System.IFormatProvider))));
                    }


                    default:
                    {
                        return(v1c.ToUInt64(default(global::System.IFormatProvider)) == v2c.ToUInt64(default(global::System.IFormatProvider)));
                    }
                    }
                }


                default:
                {
                    switch (t2)
                    {
                    case global::System.TypeCode.Int64:
                    {
                        return(((long)(v1c.ToInt64(default(global::System.IFormatProvider)))) == ((long)(v2c.ToInt64(default(global::System.IFormatProvider)))));
                    }


                    case global::System.TypeCode.Single:
                    case global::System.TypeCode.Double:
                    {
                        return(v1c.ToDouble(default(global::System.IFormatProvider)) == v2c.ToDouble(default(global::System.IFormatProvider)));
                    }


                    case global::System.TypeCode.Decimal:
                    {
                        return(v1c.ToDecimal(default(global::System.IFormatProvider)).Equals(v2c.ToDecimal(default(global::System.IFormatProvider))));
                    }


                    case global::System.TypeCode.UInt64:
                    case global::System.TypeCode.DateTime:
                    {
                        return(v1c.ToUInt64(default(global::System.IFormatProvider)) == v2c.ToUInt64(default(global::System.IFormatProvider)));
                    }


                    default:
                    {
                        return(v1c.ToInt32(default(global::System.IFormatProvider)) == v2c.ToInt32(default(global::System.IFormatProvider)));
                    }
                    }
                }
                }
            }

            if ((((global::System.ValueType)((v1 as global::System.ValueType))) != null))
            {
                return(v1.Equals(v2));
            }
            else
            {
                global::System.Type v1t = ((global::System.Type)((v1 as global::System.Type)));
                if ((v1t != null))
                {
                    global::System.Type v2t = ((global::System.Type)((v2 as global::System.Type)));
                    if ((v2t != null))
                    {
                        return(global::haxe.lang.Runtime.typeEq(v1t, v2t));
                    }

                    return(false);
                }
            }

            return(false);
        }