Esempio n. 1
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);
        }
Esempio n. 2
0
 private static void SetValue19(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle obj, global::net.sf.jni4net.utils.JniLocalHandle value)
 {
     // (Lsystem/Object;Lsystem/Object;)V
     // (LSystem/Object;LSystem/Object;)V
     global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__real.SetValue(global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, obj), global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, value));
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
 }
Esempio n. 3
0
 private static void SetValue4(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle obj, global::net.sf.jni4net.utils.JniLocalHandle value, global::net.sf.jni4net.utils.JniLocalHandle invokeAttr, global::net.sf.jni4net.utils.JniLocalHandle binder, global::net.sf.jni4net.utils.JniLocalHandle index, global::net.sf.jni4net.utils.JniLocalHandle culture)
 {
     // (Lsystem/Object;Lsystem/Object;Lsystem/reflection/BindingFlags;Lsystem/Object;[Lsystem/Object;Lsystem/Object;)V
     // (LSystem/Object;LSystem/Object;LSystem/Reflection/BindingFlags;LSystem/Reflection/Binder;[LSystem/Object;LSystem/Globalization/CultureInfo;)V
     global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         ((global::System.Runtime.InteropServices._PropertyInfo)(@__real)).SetValue(global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, obj), global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, value), global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.BindingFlags>(@__env, invokeAttr), global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.Binder>(@__env, binder), global::net.sf.jni4net.utils.Convertor.ArrayFullJ2C <object[], object>(@__env, index), global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Globalization.CultureInfo>(@__env, culture));
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
 }
Esempio n. 4
0
 private static void SetValue3(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle obj, global::net.sf.jni4net.utils.JniLocalHandle value, global::net.sf.jni4net.utils.JniLocalHandle index)
 {
     // (Lsystem/Object;Lsystem/Object;[Lsystem/Object;)V
     // (LSystem/Object;LSystem/Object;[LSystem/Object;)V
     global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         ((global::System.Runtime.InteropServices._PropertyInfo)(@__real)).SetValue(global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, obj), global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, value), global::net.sf.jni4net.utils.Convertor.ArrayFullJ2C <object[], object>(@__env, index));
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
 }
Esempio n. 5
0
 private static global::net.sf.jni4net.utils.JniHandle PropertyType0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()Lsystem/Type;
     // ()LSystem/Type;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.StrongC2Jp <global::System.Type>(@__env, ((global::System.Runtime.InteropServices._PropertyInfo)(@__real)).PropertyType);
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Esempio n. 6
0
 private static global::net.sf.jni4net.utils.JniHandle SetMethod23(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()Lsystem/reflection/MethodInfo;
     // ()LSystem/Reflection/MethodInfo;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.StrongC2Jp <global::System.Reflection.MethodInfo>(@__env, @__real.SetMethod);
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Esempio n. 7
0
 private static global::net.sf.jni4net.utils.JniHandle GetOptionalCustomModifiers21(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()[Lsystem/Type;
     // ()[LSystem/Type;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.ArrayStrongC2Jp <global::System.Type[], global::System.Type>(@__env, @__real.GetOptionalCustomModifiers());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Esempio n. 8
0
 private static global::net.sf.jni4net.utils.JniHandle GetRawConstantValue17(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()Lsystem/Object;
     // ()LSystem/Object;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.FullC2J <object>(@__env, @__real.GetRawConstantValue());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Esempio n. 9
0
 private static global::net.sf.jni4net.utils.JniHandle GetAccessors12(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
 {
     // ()[Lsystem/reflection/MethodInfo;
     // ()[LSystem/Reflection/MethodInfo;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.ArrayStrongC2Jp <global::System.Reflection.MethodInfo[], global::System.Reflection.MethodInfo>(@__env, ((global::System.Runtime.InteropServices._PropertyInfo)(@__real)).GetAccessors());
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Esempio n. 10
0
 private static global::net.sf.jni4net.utils.JniHandle GetValue1(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle obj, global::net.sf.jni4net.utils.JniLocalHandle index)
 {
     // (Lsystem/Object;[Lsystem/Object;)Lsystem/Object;
     // (LSystem/Object;[LSystem/Object;)LSystem/Object;
     global::net.sf.jni4net.jni.JNIEnv      @__env    = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
     global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle);
     try {
         global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
         @__return = global::net.sf.jni4net.utils.Convertor.FullC2J <object>(@__env, ((global::System.Runtime.InteropServices._PropertyInfo)(@__real)).GetValue(global::net.sf.jni4net.utils.Convertor.FullJ2C <object>(@__env, obj), global::net.sf.jni4net.utils.Convertor.ArrayFullJ2C <object[], object>(@__env, index)));
     }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
     return(@__return);
 }
Esempio n. 11
0
        private static bool IsSpecialName15(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj)
        {
            // ()Z
            // ()Z
            global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
            bool @__return = default(bool);

            try {
                global::System.Reflection.PropertyInfo @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C <global::System.Reflection.PropertyInfo>(@__env, @__obj);
                @__return = ((bool)(((global::System.Runtime.InteropServices._PropertyInfo)(@__real)).IsSpecialName));
            }catch (global::System.Exception __ex) { @__env.ThrowExisting(__ex); }
            return(@__return);
        }
Esempio n. 12
0
        public void ExtensionsGetValueString()
        {
            tlog.Debug(tag, $"ExtensionsGetValueString START");

            using (View view = new View())
            {
                view.Name = "view";
                global::System.Reflection.PropertyInfo propertyInfo = view.GetType().GetProperty("Name");

                var result = propertyInfo.GetValueString(view, propertyInfo.PropertyType);
                tlog.Debug(tag, "GetValueString : " + result);
            }

            tlog.Debug(tag, $"ExtensionsGetValueString END (OK)");
        }
Esempio n. 13
0
        // Token: 0x060005D8 RID: 1496 RVA: 0x0001CA9C File Offset: 0x0001AC9C
        public static void SetPropertyOrField <T>(T obj, string name, object value)
        {
            global::System.Reflection.PropertyInfo property = typeof(T).GetProperty(name, 52);
            global::System.Reflection.FieldInfo    field    = typeof(T).GetField(name, 52);
            bool flag = property != null;

            if (flag)
            {
                property.SetValue(obj, value, null);
            }
            else
            {
                bool flag2 = field != null;
                if (flag2)
                {
                    field.SetValue(obj, value);
                }
                else
                {
                    global::VRGIN.Core.VRLog.Warn("Prop/Field not found!", global::System.Array.Empty <object>());
                }
            }
        }
Esempio n. 14
0
 internal static void ExtractNestedObjects(global::SimpleORM.Attributes.DataRelationMapAttribute relationMapAttr, object obj, global::System.Data.DataRow dr, global::System.Reflection.PropertyInfo prop, bool allowNullValues)
 {
     object[] args = new object[] {
         relationMapAttr,
         obj,
         dr,
         prop,
         allowNullValues
     };
     m_privateType.InvokeStatic("ExtractNestedObjects", new System.Type[] {
         typeof(global::SimpleORM.Attributes.DataRelationMapAttribute),
         typeof(object),
         typeof(global::System.Data.DataRow),
         typeof(global::System.Reflection.PropertyInfo),
         typeof(bool)
     }, args);
 }
Esempio n. 15
0
        internal static bool ExtractValue(global::SimpleORM.Attributes.DataColumnMapAttribute columnMapAttr, object obj, global::System.Data.DataRow dr, global::System.Reflection.PropertyInfo prop, bool allowNullValues)
        {
            object[] args = new object[] {
                columnMapAttr,
                obj,
                dr,
                prop,
                allowNullValues
            };
            bool ret = ((bool)(m_privateType.InvokeStatic("ExtractValue", new System.Type[] {
                typeof(global::SimpleORM.Attributes.DataColumnMapAttribute),
                typeof(object),
                typeof(global::System.Data.DataRow),
                typeof(global::System.Reflection.PropertyInfo),
                typeof(bool)
            }, args)));

            return(ret);
        }
Esempio n. 16
0
        internal static global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor Validate(object pv_objInstance, global::System.Reflection.PropertyInfo pv_objPropertyInfo)
        {
            object[] args = new object[] {
                pv_objInstance,
                pv_objPropertyInfo
            };
            object _ret_val = m_privateType.InvokeStatic("Validate", new System.Type[] {
                typeof(object),
                typeof(global::System.Reflection.PropertyInfo)
            }, args);

            global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor _ret = null;
            if ((_ret_val != null))
            {
                _ret = new global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor(_ret_val);
            }
            global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor ret = _ret;
            return(ret);
        }
Esempio n. 17
0
        public static object slowSetField(object obj, string field, object @value)
        {
            if ((obj == null))
            {
                throw new global::System.NullReferenceException(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Cannot access field \'", field), "\' of 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))
            {
                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
            {
                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))
            {
                if ((f.FieldType as global::System.Reflection.MemberInfo).ToString().StartsWith("haxe.lang.Null"))
                {
                    @value = global::haxe.lang.Runtime.mkNullable(@value, f.FieldType);
                }

                if ((((@value != null) && global::System.Object.ReferenceEquals(((global::System.Type)(typeof(global::System.Double))), ((object)(@value.GetType())))) && !(global::System.Object.ReferenceEquals(((object)(t)), ((object)(f.FieldType))))))
                {
                    @value = ((global::System.IConvertible)((@value as global::System.IConvertible))).ToType(((global::System.Type)(f.FieldType)), default(global::System.IFormatProvider));
                }

                f.SetValue(((object)(obj)), ((object)(@value)));
                return(@value);
            }
            else
            {
                global::System.Reflection.PropertyInfo prop = t.GetProperty(((string)(field)), ((global::System.Reflection.BindingFlags)(bf)));
                if ((prop == null))
                {
                    if (t.IsCOMObject)
                    {
                        try {
                            return(t.InvokeMember(((string)(field)), ((global::System.Reflection.BindingFlags)(global::System.Reflection.BindingFlags.SetProperty)), default(global::System.Reflection.Binder), ((object)(obj)), ((object[])(new object[] { ((object)(@value)) }))));
                        }
                        catch (global::System.Exception e) {
                            global::haxe.lang.Exceptions.exception = e;
                        }
                    }

                    throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Field \'", field), "\' not found for writing from Class "), global::Std.@string(t)));
                }

                if ((prop.PropertyType as global::System.Reflection.MemberInfo).ToString().StartsWith("haxe.lang.Null"))
                {
                    @value = global::haxe.lang.Runtime.mkNullable(@value, prop.PropertyType);
                }

                if ((global::System.Object.ReferenceEquals(((global::System.Type)(typeof(global::System.Double))), ((object)(@value.GetType()))) && !(global::System.Object.ReferenceEquals(((object)(t)), ((object)(f.FieldType))))))
                {
                    @value = ((global::System.IConvertible)((@value as global::System.IConvertible))).ToType(((global::System.Type)(f.FieldType)), default(global::System.IFormatProvider));
                }

                prop.SetValue(((object)(obj)), ((object)(@value)), default(object[]));
                return(@value);
            }
        }
Esempio n. 18
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[]))));
            }
        }