// Ctor for imported properties public PropertyExpEntry( ISemanticResolver s, System.Reflection.PropertyInfo info ) { m_info = info; m_strName = m_info.Name; // Class that we're defined in? System.Type tClrClass = info.DeclaringType; m_tClassDefined = s.ResolveCLRTypeToBlueType(tClrClass); // Symbol type this.m_type = s.ResolveCLRTypeToBlueType(info.PropertyType); // Spoof accessors if (info.CanRead) // Has Get { System.Reflection.MethodInfo mGet = info.GetGetMethod(); m_symbolGet = new MethodExpEntry(s, mGet); } if (info.CanWrite) // Has Set { System.Reflection.MethodInfo mSet = info.GetSetMethod(); m_symbolSet = new MethodExpEntry(s, mSet); } // Get modifiers System.Reflection.MethodInfo [] m = info.GetAccessors(); m_mods = new Modifiers(m[0]); /* * m_mods = new Modifiers(); * if (m[0].IsStatic) m_mods.SetStatic(); * if (m[0].IsAbstract) m_mods.SetAbstract(); * if (m[0].IsVirtual) m_mods.SetVirtual(); */ }
//THIS DOESNT WORK - REMOVED FROM THE CHECK FUNCTION FOR NOW bool ProcessStructVariableTypes(object input, int inputType) { if (inputType == 0) { System.Reflection.PropertyInfo p = input as System.Reflection.PropertyInfo; Debug.Log("name: " + p.Name + " attributes: " + p.Attributes + " declaring type: " + p.DeclaringType + " accessors: " + p.GetAccessors() + " attributes: " + p.GetCustomAttributes(true) + " getmethod: " + p.GetGetMethod() + " setmethod: " + p.GetSetMethod() + " type: " + p.GetType() + " membertype: " + p.MemberType + " module: " + p.Module + " proptype: " + p.PropertyType + " reftype: " + p.ReflectedType); CompleteVariableSetup(16); return(false); } return(false); }