public Method (MethodInfo minfo) { List <Type> native_parms = new List <Type> (); List <Type> real_parms = new List <Type> (); // hold this and the selector native_parms.Add (typeof (IntPtr)); native_parms.Add (typeof (IntPtr)); real_parms.Add (typeof (IntPtr)); real_parms.Add (typeof (IntPtr)); selector = new Selector (minfo.Name); signature = TypeToNativeRepresentation (minfo.ReturnType).ToString (); signature += "@:"; foreach (ParameterInfo param in minfo.GetParameters ()) { if (param.ParameterType == typeof (Object)) native_parms.Add (typeof (IntPtr)); else native_parms.Add (param.ParameterType); real_parms.Add (param.ParameterType); signature += TypeToNativeRepresentation (param.ParameterType); } native_parameters = (Type []) native_parms.ToArray (); real_parameters = (Type []) real_parms.ToArray (); delegate_type = CreateDelegateType (minfo); del = CreateDelegate (minfo); }
public MethodSignature (Object obj, Selector selector) { handle = Messaging.objc_msgSend (obj.handle, new Selector ("methodSignatureForSelector:").Handle, selector.Handle); }