MetadataBuilder.AddTypeDefinition(TypeAttributes, StringHandle, StringHandle, EntityHandle, FieldDefinitionHandle, MethodDefinitionHandle) Método
Definição
Adiciona uma definição de tipo.Adds a type definition.
public:
System::Reflection::Metadata::TypeDefinitionHandle AddTypeDefinition(System::Reflection::TypeAttributes attributes, System::Reflection::Metadata::StringHandle namespace, System::Reflection::Metadata::StringHandle name, System::Reflection::Metadata::EntityHandle baseType, System::Reflection::Metadata::FieldDefinitionHandle fieldList, System::Reflection::Metadata::MethodDefinitionHandle methodList);
public System.Reflection.Metadata.TypeDefinitionHandle AddTypeDefinition (System.Reflection.TypeAttributes attributes, System.Reflection.Metadata.StringHandle namespace, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle baseType, System.Reflection.Metadata.FieldDefinitionHandle fieldList, System.Reflection.Metadata.MethodDefinitionHandle methodList);
member this.AddTypeDefinition : System.Reflection.TypeAttributes * System.Reflection.Metadata.StringHandle * System.Reflection.Metadata.StringHandle * System.Reflection.Metadata.EntityHandle * System.Reflection.Metadata.FieldDefinitionHandle * System.Reflection.Metadata.MethodDefinitionHandle -> System.Reflection.Metadata.TypeDefinitionHandle
Public Function AddTypeDefinition (attributes As TypeAttributes, namespace As StringHandle, name As StringHandle, baseType As EntityHandle, fieldList As FieldDefinitionHandle, methodList As MethodDefinitionHandle) As TypeDefinitionHandle
Parâmetros
- attributes
- TypeAttributes
Os atributos de tipo.The type attributes.
- namespace
- StringHandle
O namespace de tipo.The type namespace.
- name
- StringHandle
O nome do tipo.The type name.
- baseType
- EntityHandle
O identificador de entidade de tipo base, que pode ser um dos seguintes: TypeDefinitionHandle, TypeReferenceHandle, TypeSpecificationHandle ou null.The base type entity handle, which can be one of the following: TypeDefinitionHandle, TypeReferenceHandle, TypeSpecificationHandle, or null.
- fieldList
- FieldDefinitionHandle
Se o tipo declarar campos, defina esse identificador como o identificador do primeiro deles.If the type declares fields, set this to the handle of the first one. Caso contrário, defina-o como o identificador do primeiro campo declarado pela próxima definição de tipo.Otherwise, set this to the handle of the first field declared by the next type definition. Se nenhum tipo definir nenhum campo no módulo, System.Reflection.Metadata.Ecma335.MetadataTokens.FieldDefinitionHandle(1).If no type defines any fields in the module, System.Reflection.Metadata.Ecma335.MetadataTokens.FieldDefinitionHandle(1).
- methodList
- MethodDefinitionHandle
Se o tipo declarar métodos, defina esse identificador como o identificador do primeiro deles.If the type declares methods, the handle of the first one. Caso contrário, defina-o como o identificador do primeiro método declarado pela definição de tipo seguinte.Otherwise, the handle of the first method declared by the next type definition. Se nenhum tipo definir nenhum método no módulo, System.Reflection.Metadata.Ecma335.MetadataTokens.MethodDefinitionHandle(1).If no type defines any methods in the module, System.Reflection.Metadata.Ecma335.MetadataTokens.MethodDefinitionHandle(1).
Retornos
Um identificador para a definição de tipo adicionada.A handle to the added type definition.
Exceções
baseType não tem o tipo de identificador esperado.baseType doesn't have the expected handle kind.