Пример #1
0
        RuntimeType[] GetNestedTypes_internal(string displayName, BindingFlags bindingAttr, MemberListType listType)
        {
            string internalName = null;

#if NETCORE
            if (displayName != null)
            {
                internalName = displayName;
            }
#else
            if (displayName != null)
            {
                internalName = TypeIdentifiers.FromDisplay(displayName).InternalName;
            }
#endif
            using (var namePtr = new Mono.SafeStringMarshal(internalName))
                using (var h = new Mono.SafeGPtrArrayHandle(GetNestedTypes_native(namePtr.Value, bindingAttr, listType))) {
                    int n = h.Length;
                    var a = new RuntimeType [n];
                    for (int i = 0; i < n; i++)
                    {
                        var th = new RuntimeTypeHandle(h[i]);
                        a[i] = (RuntimeType)Type.GetTypeFromHandle(th);
                    }
                    return(a);
                }
        }
Пример #2
0
 private static ITypeIdentifier ParsedTypeIdentifier(string displayName)
 {
     return(TypeIdentifiers.FromDisplay(displayName));
 }