MetadataBuilder.AddInterfaceImplementation 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将接口实现添加到类型。
public:
System::Reflection::Metadata::InterfaceImplementationHandle AddInterfaceImplementation(System::Reflection::Metadata::TypeDefinitionHandle type, System::Reflection::Metadata::EntityHandle implementedInterface);
public System.Reflection.Metadata.InterfaceImplementationHandle AddInterfaceImplementation(System.Reflection.Metadata.TypeDefinitionHandle type, System.Reflection.Metadata.EntityHandle implementedInterface);
member this.AddInterfaceImplementation : System.Reflection.Metadata.TypeDefinitionHandle * System.Reflection.Metadata.EntityHandle -> System.Reflection.Metadata.InterfaceImplementationHandle
Public Function AddInterfaceImplementation (type As TypeDefinitionHandle, implementedInterface As EntityHandle) As InterfaceImplementationHandle
参数
- type
- TypeDefinitionHandle
实现接口的类型。
- implementedInterface
- EntityHandle
要实现的接口,可以是下列接口之一: TypeDefinitionHandle、 TypeReferenceHandle或 TypeSpecificationHandle。
返回
已添加接口实现的句柄。
例外
implementedInterface 没有预期的句柄类型。
注解
必须按照实现接口的相应类型定义的顺序添加接口实现。
如果类型实现多个接口,则必须按编码索引(CodedIndex.TypeDefOrRefOrSpec(EntityHandle))确定的顺序添加相应的条目。