internal static MonoPropertyInfo Create(IMonoStructType klass, int index, Cecil.PropertyDefinition pinfo) { TargetType type = klass.File.MonoLanguage.LookupMonoType(pinfo.PropertyType); bool is_static = false; MonoFunctionType getter, setter; TargetMemberAccessibility accessibility = TargetMemberAccessibility.Private; if (pinfo.SetMethod != null) { setter = klass.LookupFunction(pinfo.SetMethod); is_static = pinfo.SetMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility(pinfo.SetMethod); } else { setter = null; } if (pinfo.GetMethod != null) { getter = klass.LookupFunction(pinfo.GetMethod); is_static = pinfo.GetMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility(pinfo.GetMethod); } else { getter = null; } return(new MonoPropertyInfo( type, klass, index, is_static, pinfo, accessibility, getter, setter)); }
internal static MonoMethodInfo Create(IMonoStructType klass, int index, Cecil.MethodDefinition minfo) { MonoFunctionType type = klass.LookupFunction(minfo); return(new MonoMethodInfo(klass, index, minfo, type)); }
internal static MonoEventInfo Create(IMonoStructType klass, int index, Cecil.EventDefinition einfo) { TargetType type = klass.File.MonoLanguage.LookupMonoType(einfo.EventType); bool is_static = false; MonoFunctionType add, remove, raise; TargetMemberAccessibility accessibility = TargetMemberAccessibility.Private; if (einfo.AddMethod != null) { add = klass.LookupFunction(einfo.AddMethod); is_static = einfo.AddMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility(einfo.AddMethod); } else { add = null; } if (einfo.RemoveMethod != null) { remove = klass.LookupFunction(einfo.RemoveMethod); is_static = einfo.RemoveMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility(einfo.RemoveMethod); } else { remove = null; } if (einfo.InvokeMethod != null) { raise = klass.LookupFunction(einfo.InvokeMethod); is_static = einfo.InvokeMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility(einfo.InvokeMethod); } else { raise = null; } return(new MonoEventInfo( klass, index, einfo, type, is_static, accessibility, add, remove, raise)); }
internal static MonoEventInfo Create(IMonoStructType klass, int index, Cecil.EventDefinition einfo) { TargetType type = klass.File.MonoLanguage.LookupMonoType (einfo.EventType); bool is_static = false; MonoFunctionType add, remove, raise; TargetMemberAccessibility accessibility = TargetMemberAccessibility.Private; if (einfo.AddMethod != null) { add = klass.LookupFunction (einfo.AddMethod); is_static = einfo.AddMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility (einfo.AddMethod); } else add = null; if (einfo.RemoveMethod != null) { remove = klass.LookupFunction (einfo.RemoveMethod); is_static = einfo.RemoveMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility (einfo.RemoveMethod); } else remove = null; if (einfo.InvokeMethod != null) { raise = klass.LookupFunction (einfo.InvokeMethod); is_static = einfo.InvokeMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility (einfo.InvokeMethod); } else raise = null; return new MonoEventInfo ( klass, index, einfo, type, is_static, accessibility, add, remove, raise); }
internal static MonoPropertyInfo Create(IMonoStructType klass, int index, Cecil.PropertyDefinition pinfo) { TargetType type = klass.File.MonoLanguage.LookupMonoType (pinfo.PropertyType); bool is_static = false; MonoFunctionType getter, setter; TargetMemberAccessibility accessibility = TargetMemberAccessibility.Private; if (pinfo.SetMethod != null) { setter = klass.LookupFunction (pinfo.SetMethod); is_static = pinfo.SetMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility (pinfo.SetMethod); } else setter = null; if (pinfo.GetMethod != null) { getter = klass.LookupFunction (pinfo.GetMethod); is_static = pinfo.GetMethod.IsStatic; accessibility = MonoMethodInfo.GetAccessibility (pinfo.GetMethod); } else getter = null; return new MonoPropertyInfo ( type, klass, index, is_static, pinfo, accessibility, getter, setter); }
internal static MonoMethodInfo Create(IMonoStructType klass, int index, Cecil.MethodDefinition minfo) { MonoFunctionType type = klass.LookupFunction (minfo); return new MonoMethodInfo (klass, index, minfo, type); }