MetadataBuilder.AddMethodDefinition 메서드

정의

메서드 정의를 추가합니다.

public:
 System::Reflection::Metadata::MethodDefinitionHandle AddMethodDefinition(System::Reflection::MethodAttributes attributes, System::Reflection::MethodImplAttributes implAttributes, System::Reflection::Metadata::StringHandle name, System::Reflection::Metadata::BlobHandle signature, int bodyOffset, System::Reflection::Metadata::ParameterHandle parameterList);
public System.Reflection.Metadata.MethodDefinitionHandle AddMethodDefinition (System.Reflection.MethodAttributes attributes, System.Reflection.MethodImplAttributes implAttributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle signature, int bodyOffset, System.Reflection.Metadata.ParameterHandle parameterList);
member this.AddMethodDefinition : System.Reflection.MethodAttributes * System.Reflection.MethodImplAttributes * System.Reflection.Metadata.StringHandle * System.Reflection.Metadata.BlobHandle * int * System.Reflection.Metadata.ParameterHandle -> System.Reflection.Metadata.MethodDefinitionHandle
Public Function AddMethodDefinition (attributes As MethodAttributes, implAttributes As MethodImplAttributes, name As StringHandle, signature As BlobHandle, bodyOffset As Integer, parameterList As ParameterHandle) As MethodDefinitionHandle

매개 변수

attributes
MethodAttributes

메서드 특성입니다.

implAttributes
MethodImplAttributes

메서드 구현 특성입니다.

name
StringHandle

메서드 이름입니다.

signature
BlobHandle

메서드 시그니처입니다.

bodyOffset
Int32

메서드 본문(IL 스트림)을 저장하는 PE 이미지의 블록 내 오프셋이거나, 메서드에 본문이 없는 경우 -1입니다.

parameterList
ParameterHandle

메서드가 Params 테이블에 매개 변수를 선언하는 경우 이를 첫 번째 매개 변수의 핸들로 설정합니다. 그렇지 않으면 이를 다음 메서드 정의에 의해 선언된 첫 번째 매개 변수의 핸들로 설정합니다. 모듈에 선언된 매개 변수가 없으면 System.Reflection.Metadata.Ecma335.MetadataTokens.ParameterHandle(1)입니다.

반환

추가된 메서드 정의에 대한 핸들입니다.

예외

bodyOffset이 -1보다 작습니다.

설명

메타데이터에 저장된 최종 상대 가상 주소는 블록 시작 부분의 가상 주소에 오프셋을 추가하여 메타데이터가 serialize될 때 계산됩니다.

적용 대상