Ejemplo n.º 1
0
 public static global::Array <string> getEnumConstructs(global::System.Type e)
 {
             #line 245 "/opt/haxe/std/cs/_std/Type.hx"
     global::System.Type t = (((object)(e)) as global::System.Type);
     global::haxe.lang.Null <global::System.Reflection.BindingFlags> initial = new global::haxe.lang.Null <global::System.Reflection.BindingFlags>(global::System.Reflection.BindingFlags.Static, true);
     global::System.Reflection.BindingFlags this1 = ((!(initial.hasValue)) ? (default(global::System.Reflection.BindingFlags)) : ((initial).@value));
     global::haxe.lang.Null <global::System.Reflection.BindingFlags> initial1 = new global::haxe.lang.Null <global::System.Reflection.BindingFlags>((((global::System.Reflection.BindingFlags)(this1)) | ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.NonPublic))), true);
     global::System.Reflection.BindingFlags this2 = ((!(initial1.hasValue)) ? (default(global::System.Reflection.BindingFlags)) : ((initial1).@value));
     global::System.Reflection.FieldInfo    f     = t.GetField(((string)("__hx_constructs")), ((global::System.Reflection.BindingFlags)(this2)));
             #line 247 "/opt/haxe/std/cs/_std/Type.hx"
     if ((f != null))
     {
                     #line 248 "/opt/haxe/std/cs/_std/Type.hx"
         global::System.Array values = ((global::System.Array)(f.GetValue(default(object))));
         string[]             copy   = new string[values.Length];
                     #line 250 "/opt/haxe/std/cs/_std/Type.hx"
         global::System.Array.Copy(((global::System.Array)(values)), ((global::System.Array)(copy)), ((int)(values.Length)));
         return(new global::Array <string>(((string[])(copy))));
     }
     else
     {
                     #line 253 "/opt/haxe/std/cs/_std/Type.hx"
         return(new global::Array <string>(((string[])(global::System.Enum.GetNames(((global::System.Type)(t)))))));
     }
 }
Ejemplo n.º 2
0
        // Token: 0x060005D9 RID: 1497 RVA: 0x0001CB20 File Offset: 0x0001AD20
        public static object GetPropertyOrField <T>(T obj, string name)
        {
            global::System.Reflection.PropertyInfo property = typeof(T).GetProperty(name, 52);
            global::System.Reflection.FieldInfo    field    = typeof(T).GetField(name, 52);
            bool   flag = property != null;
            object result;

            if (flag)
            {
                result = property.GetValue(obj, null);
            }
            else
            {
                bool flag2 = field != null;
                if (flag2)
                {
                    result = field.GetValue(obj);
                }
                else
                {
                    global::VRGIN.Core.VRLog.Warn("Prop/Field not found!", global::System.Array.Empty <object>());
                    result = null;
                }
            }
            return(result);
        }
        public static global::System.Object getVisualStateProperty_50aaaf9819334ab9a5e132c1f664445d(global::System.Windows.DependencyObject finalTargetInstance)
        {
            global::System.Type finalTargetInstanceType             = finalTargetInstance.GetType();
            global::System.Type propertyDeclaringType               = finalTargetInstanceType.GetProperty("FontWeight").DeclaringType;
            global::System.Reflection.FieldInfo       propertyField = propertyDeclaringType.GetField("FontWeightProperty");
            global::System.Windows.DependencyProperty property      = (global::System.Windows.DependencyProperty)propertyField.GetValue(null);

            return(finalTargetInstance.GetVisualStateValue(property));
        }
        public static void setLocalVisualStateProperty_50aaaf9819334ab9a5e132c1f664445d(global::Windows.UI.Xaml.DependencyObject finalTargetInstance, object value)
        {
            global::System.Type finalTargetInstanceType = finalTargetInstance.GetType();
            global::System.Type propertyDeclaringType   = finalTargetInstanceType.GetProperty("FontWeight").DeclaringType;
            global::System.Reflection.FieldInfo        propertyField = propertyDeclaringType.GetField("FontWeightProperty");
            global::Windows.UI.Xaml.DependencyProperty property      = (global::Windows.UI.Xaml.DependencyProperty)propertyField.GetValue(null);

            (finalTargetInstance).SetLocalValue(property, value);
        }
Ejemplo n.º 5
0
        public static object slowGetField(object obj, string field, bool throwErrors)
        {
            if ((obj == null))
            {
                if (throwErrors)
                {
                    throw new global::System.NullReferenceException(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Cannot access field \'", field), "\' of null."));
                }
                else
                {
                    return(null);
                }
            }

            global::System.Type t = ((global::System.Type)((obj as global::System.Type)));
            global::System.Reflection.BindingFlags bf = default(global::System.Reflection.BindingFlags);
            if ((t == null))
            {
                string s = ((string)((obj as string)));
                if (!(string.Equals(s, null)))
                {
                    return(global::haxe.lang.StringRefl.handleGetField(s, field, throwErrors));
                }

                t  = ((global::System.Type)(obj.GetType()));
                bf = ((global::System.Reflection.BindingFlags)((((global::System.Reflection.BindingFlags)((((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.Instance)) | ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.Public))))) | ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.FlattenHierarchy)))));
            }
            else
            {
                if (((t == ((global::System.Type)(typeof(string)))) && string.Equals(field, "fromCharCode")))
                {
                    return(new global::haxe.lang.Closure(typeof(global::haxe.lang.StringExt), field, 0));
                }

                obj = null;
                bf  = ((global::System.Reflection.BindingFlags)((((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.Static)) | ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.Public)))));
            }

            global::System.Reflection.FieldInfo f = t.GetField(((string)(field)), ((global::System.Reflection.BindingFlags)(bf)));
            if ((f != null))
            {
                return(global::haxe.lang.Runtime.unbox(f.GetValue(((object)(obj)))));
            }
            else
            {
                global::System.Reflection.PropertyInfo prop = t.GetProperty(((string)(field)), ((global::System.Reflection.BindingFlags)(bf)));
                if ((prop == null))
                {
                    global::System.Reflection.MemberInfo[] m = t.GetMember(((string)(field)), ((global::System.Reflection.BindingFlags)(bf)));
                    if ((((m as global::System.Array).Length == 0) && ((string.Equals(field, "__get") || string.Equals(field, "__set")))))
                    {
                        m = t.GetMember(((string)(((string.Equals(field, "__get")) ? ("get_Item") : ("set_Item")))), ((global::System.Reflection.BindingFlags)(bf)));
                    }

                    if (((m as global::System.Array).Length > 0))
                    {
                        return(new global::haxe.lang.Closure((((obj != null)) ? (obj) : ((object)(t))), field, 0));
                    }
                    else
                    {
                        if (t.IsCOMObject)
                        {
                            try {
                                return(t.InvokeMember(((string)(field)), ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.GetProperty)), default(global::System.Reflection.Binder), ((object)(obj)), ((object[])(new object[0]))));
                            }
                            catch (global::System.Exception e) {
                                global::haxe.lang.Exceptions.exception = e;
                            }
                        }

                        if (throwErrors)
                        {
                            throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Cannot access field \'", field), "\'."));
                        }
                        else
                        {
                            return(null);
                        }
                    }
                }

                return(global::haxe.lang.Runtime.unbox(prop.GetValue(((object)(obj)), default(object[]))));
            }
        }
Ejemplo n.º 6
0
        public static global::haxe.root.Array getEnumConstructs(global::System.Type e)
        {
                        #line 245 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
            global::System.Type t = ((global::System.Type)((((object)(e)) as global::System.Type)));
            object initial        = global::System.Reflection.BindingFlags.Static;
            global::System.Reflection.BindingFlags this1 = (((initial == default(object))) ? (default(global::System.Reflection.BindingFlags)) : (((global::System.Reflection.BindingFlags)(initial))));
            object initial1 = ((global::System.Reflection.BindingFlags)((((global::System.Reflection.BindingFlags)(this1)) | ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.NonPublic)))));
            global::System.Reflection.BindingFlags this2 = (((initial1 == default(object))) ? (default(global::System.Reflection.BindingFlags)) : (((global::System.Reflection.BindingFlags)(initial1))));
            global::System.Reflection.FieldInfo    f     = t.GetField(((string)("__hx_constructs")), ((global::System.Reflection.BindingFlags)(this2)));
                        #line 247 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
            if ((f != null))
            {
                                #line 248 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                global::System.Array values = ((global::System.Array)(f.GetValue(default(object))));
                string[]             copy   = new string[values.Length];
                                #line 250 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                global::System.Array.Copy(((global::System.Array)(values)), ((global::System.Array)(copy)), ((int)(values.Length)));
                object[] ret = new object[(copy as global::System.Array).Length];
                {
                                        #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    int _g = 0;
                                        #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    int _g1 = (copy as global::System.Array).Length;
                                        #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    while ((_g < _g1))
                    {
                                                #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        int i = _g++;
                                                #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        ret[i] = ((string)(copy[i]));
                    }
                }

                                #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                object[] dyn = ret;
                                #line 251 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                return(new global::haxe.root.Array(((object[])(dyn))));
            }
            else
            {
                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                string[] native = global::System.Enum.GetNames(((global::System.Type)(t)));
                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                object[] ret1 = new object[(native as global::System.Array).Length];
                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                {
                                        #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    int _g2 = 0;
                                        #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    int _g11 = (native as global::System.Array).Length;
                                        #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    while ((_g2 < _g11))
                    {
                                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        int i1 = _g2++;
                                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        ret1[i1] = ((string)(native[i1]));
                    }
                }

                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                object[] dyn1 = ret1;
                                #line 253 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                return(new global::haxe.root.Array(((object[])(dyn1))));
            }
        }