internal sealed override RoDefinitionType GetNestedTypeCore(ReadOnlySpan <byte> utf8Name)
        {
            RoDefinitionType match  = null;
            MetadataReader   reader = Reader;

            foreach (TypeDefinitionHandle handle in TypeDefinition.GetNestedTypes())
            {
                TypeDefinition nestedTypeDefinition = handle.GetTypeDefinition(reader);
                if (nestedTypeDefinition.Name.Equals(utf8Name, reader))
                {
                    if (match != null)
                    {
                        throw new AmbiguousMatchException();
                    }
                    match = handle.ResolveTypeDef(GetEcmaModule());
                }
            }
            return(match);
        }
Exemplo n.º 2
0
 public static RoConstructedGenericType GetUniqueConstructedGenericType(this RoDefinitionType genericTypeDefinition, RoType[] genericTypeArguments) => genericTypeDefinition.GetRoModule().GetUniqueConstructedGenericType(genericTypeDefinition, genericTypeArguments);