示例#1
0
        public static bool typeEq(global::System.Type t1, global::System.Type t2)
        {
            if (((t1 == null) || (t2 == null)))
            {
                return(t1 == t2);
            }

            bool t1i = t1.IsInterface;

            if ((t1i != t2.IsInterface))
            {
                if (t1i)
                {
                    global::haxe.lang.GenericInterface g = global::haxe.lang.Runtime.getGenericAttr(t1);
                    if ((g != null))
                    {
                        t1 = g.generic;
                    }
                }
                else
                {
                    global::haxe.lang.GenericInterface g1 = global::haxe.lang.Runtime.getGenericAttr(t2);
                    if ((g1 != null))
                    {
                        t2 = g1.generic;
                    }
                }
            }

            if (((t1.GetGenericArguments() as global::System.Array).Length > 0))
            {
                t1 = t1.GetGenericTypeDefinition();
            }

            if (((t2.GetGenericArguments() as global::System.Array).Length > 0))
            {
                t2 = t2.GetGenericTypeDefinition();
            }

            return(global::System.Object.ReferenceEquals(((object)(t1)), ((object)(t2))));
        }