RuntimePropertyInfo[] GetPropertiesByName(string name, BindingFlags bindingAttr, MemberListType listType, RuntimeType reflectedType) { var refh = new RuntimeTypeHandle(reflectedType); using (var namePtr = new Mono.SafeStringMarshal(name)) using (var h = new Mono.SafeGPtrArrayHandle(GetPropertiesByName_native(namePtr.Value, bindingAttr, listType))) { var n = h.Length; var a = new RuntimePropertyInfo [n]; for (int i = 0; i < n; i++) { var ph = new Mono.RuntimePropertyHandle(h[i]); a[i] = (RuntimePropertyInfo)RuntimePropertyInfo.GetPropertyFromHandle(ph, refh); } return(a); } }
RuntimePropertyInfo[] GetPropertiesByName (string name, BindingFlags bindingAttr, bool icase, RuntimeType reflectedType) { var refh = new RuntimeTypeHandle (reflectedType); using (var h = new Mono.SafeGPtrArrayHandle (GetPropertiesByName_native (name, bindingAttr, icase))) { var n = h.Length; var a = new RuntimePropertyInfo [n]; for (int i = 0; i < n; i++) { var ph = new Mono.RuntimePropertyHandle (h[i]); a[i] = (RuntimePropertyInfo) PropertyInfo.GetPropertyFromHandle (ph, refh); } return a; } }