MethodBodyStreamEncoder.AddMethodBody 메서드

정의

오버로드

AddMethodBody(InstructionEncoder, Int32, StandaloneSignatureHandle, MethodBodyAttributes)

메서드 본문을 인코딩하여 메서드 본문 스트림에 추가합니다.

AddMethodBody(InstructionEncoder, Int32, StandaloneSignatureHandle, MethodBodyAttributes, Boolean)

메서드 본문을 인코딩하고 제공된 명령 인코더, 최대 스택 크기, 지역 변수의 시그니처 핸들, 메서드 본문 특성을 사용하여 메서드 본문 스트림에 추가하고 메서드를 동적 로컬 메모리 풀에서 할당할지 여부를 나타낼 수 있습니다.

AddMethodBody(Int32, Int32, Int32, Boolean, StandaloneSignatureHandle, MethodBodyAttributes)

메서드 본문을 인코딩하고 제공된 코드 크기, 최대 스택 크기, 예외 영역의 수, 지역 변수의 시그니처 핸들, 메서드 본문 특성을 사용하여 메서드 본문 스트림에 추가하고 예외 영역을 작은 형식으로 인코딩할지 여부를 나타낼 수 있습니다.

AddMethodBody(Int32, Int32, Int32, Boolean, StandaloneSignatureHandle, MethodBodyAttributes, Boolean)

메서드 본문을 인코딩하고 제공된 코드 크기, 최대 스택 크기, 예외 영역의 수, 지역 변수의 시그니처 핸들, 메서드 본문 특성을 사용하여 메서드 본문 스트림에 추가하고 예외 영역을 작은 형식으로 인코딩할지 여부를 나타내고, 메서드를 동적 로컬 메모리 풀에서 할당할지 여부를 나타낼 수 있습니다.

AddMethodBody(InstructionEncoder, Int32, StandaloneSignatureHandle, MethodBodyAttributes)

Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs

메서드 본문을 인코딩하여 메서드 본문 스트림에 추가합니다.

public:
 int AddMethodBody(System::Reflection::Metadata::Ecma335::InstructionEncoder instructionEncoder, int maxStack, System::Reflection::Metadata::StandaloneSignatureHandle localVariablesSignature, System::Reflection::Metadata::Ecma335::MethodBodyAttributes attributes);
public int AddMethodBody (System.Reflection.Metadata.Ecma335.InstructionEncoder instructionEncoder, int maxStack, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes);
public int AddMethodBody (System.Reflection.Metadata.Ecma335.InstructionEncoder instructionEncoder, int maxStack = 8, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals);
member this.AddMethodBody : System.Reflection.Metadata.Ecma335.InstructionEncoder * int * System.Reflection.Metadata.StandaloneSignatureHandle * System.Reflection.Metadata.Ecma335.MethodBodyAttributes -> int
Public Function AddMethodBody (instructionEncoder As InstructionEncoder, maxStack As Integer, localVariablesSignature As StandaloneSignatureHandle, attributes As MethodBodyAttributes) As Integer
Public Function AddMethodBody (instructionEncoder As InstructionEncoder, Optional maxStack As Integer = 8, Optional localVariablesSignature As StandaloneSignatureHandle = Nothing, Optional attributes As MethodBodyAttributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals) As Integer

매개 변수

instructionEncoder
InstructionEncoder

명령 인코더입니다.

maxStack
Int32

최대 스택 크기입니다.

localVariablesSignature
StandaloneSignatureHandle

지역 변수의 시그니처 핸들입니다.

attributes
MethodBodyAttributes

메서드 본문 특성입니다.

반환

메서드 본문 스트림 내에서 인코딩된 본문의 오프셋입니다.

예외

instructionEncoder에 기본값이 있습니다.

maxStack 이 범위를 벗어났습니다.[0, UInt16.MaxValue].

명령 스트림의 분기가 대상으로 하는 레이블이 표시되지 않았거나 분기 명령과 대상 레이블 간의 거리가 명령 피연산자의 크기에 맞지 않습니다.

적용 대상

AddMethodBody(InstructionEncoder, Int32, StandaloneSignatureHandle, MethodBodyAttributes, Boolean)

Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs

메서드 본문을 인코딩하고 제공된 명령 인코더, 최대 스택 크기, 지역 변수의 시그니처 핸들, 메서드 본문 특성을 사용하여 메서드 본문 스트림에 추가하고 메서드를 동적 로컬 메모리 풀에서 할당할지 여부를 나타낼 수 있습니다.

public int AddMethodBody (System.Reflection.Metadata.Ecma335.InstructionEncoder instructionEncoder, int maxStack = 8, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals, bool hasDynamicStackAllocation = false);
member this.AddMethodBody : System.Reflection.Metadata.Ecma335.InstructionEncoder * int * System.Reflection.Metadata.StandaloneSignatureHandle * System.Reflection.Metadata.Ecma335.MethodBodyAttributes * bool -> int
Public Function AddMethodBody (instructionEncoder As InstructionEncoder, Optional maxStack As Integer = 8, Optional localVariablesSignature As StandaloneSignatureHandle = Nothing, Optional attributes As MethodBodyAttributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals, Optional hasDynamicStackAllocation As Boolean = false) As Integer

매개 변수

instructionEncoder
InstructionEncoder

명령 인코더입니다.

maxStack
Int32

최대 스택 크기입니다.

localVariablesSignature
StandaloneSignatureHandle

지역 변수의 시그니처 핸들입니다.

attributes
MethodBodyAttributes

메서드 본문 특성입니다.

hasDynamicStackAllocation
Boolean

메서드가 동적 로컬 메모리 풀에서 할당되는 경우(IL에 localloc 명령이 포함된 경우) true이고, 그렇지 않으면 false입니다.

반환

메서드 본문 스트림 내에서 인코딩된 본문의 오프셋입니다.

예외

instructionEncoder에 기본값이 있습니다.

maxStack 이 범위를 벗어났습니다.[0, UInt16.MaxValue].

명령 스트림의 분기가 대상으로 하는 레이블이 표시되지 않았거나 분기 명령과 대상 레이블 간의 거리가 명령 피연산자의 크기에 맞지 않습니다.

적용 대상

AddMethodBody(Int32, Int32, Int32, Boolean, StandaloneSignatureHandle, MethodBodyAttributes)

Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs

메서드 본문을 인코딩하고 제공된 코드 크기, 최대 스택 크기, 예외 영역의 수, 지역 변수의 시그니처 핸들, 메서드 본문 특성을 사용하여 메서드 본문 스트림에 추가하고 예외 영역을 작은 형식으로 인코딩할지 여부를 나타낼 수 있습니다.

public:
 System::Reflection::Metadata::Ecma335::MethodBodyStreamEncoder::MethodBody AddMethodBody(int codeSize, int maxStack, int exceptionRegionCount, bool hasSmallExceptionRegions, System::Reflection::Metadata::StandaloneSignatureHandle localVariablesSignature, System::Reflection::Metadata::Ecma335::MethodBodyAttributes attributes);
public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody (int codeSize, int maxStack, int exceptionRegionCount, bool hasSmallExceptionRegions, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes);
public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody (int codeSize, int maxStack = 8, int exceptionRegionCount = 0, bool hasSmallExceptionRegions = true, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals);
member this.AddMethodBody : int * int * int * bool * System.Reflection.Metadata.StandaloneSignatureHandle * System.Reflection.Metadata.Ecma335.MethodBodyAttributes -> System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody
Public Function AddMethodBody (codeSize As Integer, maxStack As Integer, exceptionRegionCount As Integer, hasSmallExceptionRegions As Boolean, localVariablesSignature As StandaloneSignatureHandle, attributes As MethodBodyAttributes) As MethodBodyStreamEncoder.MethodBody
Public Function AddMethodBody (codeSize As Integer, Optional maxStack As Integer = 8, Optional exceptionRegionCount As Integer = 0, Optional hasSmallExceptionRegions As Boolean = true, Optional localVariablesSignature As StandaloneSignatureHandle = Nothing, Optional attributes As MethodBodyAttributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals) As MethodBodyStreamEncoder.MethodBody

매개 변수

codeSize
Int32

명령에 예약될 바이트 수입니다.

maxStack
Int32

최대 스택 크기입니다.

exceptionRegionCount
Int32

예외 영역의 수입니다.

hasSmallExceptionRegions
Boolean

예외 영역을 작은 형식으로 인코딩해야 하는 경우 true이고, 그렇지 않으면 false입니다.

localVariablesSignature
StandaloneSignatureHandle

지역 변수의 시그니처 핸들입니다.

attributes
MethodBodyAttributes

메서드 본문 특성입니다.

반환

메서드 본문 스트림 내에서 인코딩된 본문의 오프셋입니다.

예외

codeSize, exceptionRegionCount 또는 maxStack이 허용되는 범위를 벗어났습니다.

적용 대상

AddMethodBody(Int32, Int32, Int32, Boolean, StandaloneSignatureHandle, MethodBodyAttributes, Boolean)

Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs
Source:
MethodBodyStreamEncoder.cs

메서드 본문을 인코딩하고 제공된 코드 크기, 최대 스택 크기, 예외 영역의 수, 지역 변수의 시그니처 핸들, 메서드 본문 특성을 사용하여 메서드 본문 스트림에 추가하고 예외 영역을 작은 형식으로 인코딩할지 여부를 나타내고, 메서드를 동적 로컬 메모리 풀에서 할당할지 여부를 나타낼 수 있습니다.

public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody (int codeSize, int maxStack = 8, int exceptionRegionCount = 0, bool hasSmallExceptionRegions = true, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals, bool hasDynamicStackAllocation = false);
member this.AddMethodBody : int * int * int * bool * System.Reflection.Metadata.StandaloneSignatureHandle * System.Reflection.Metadata.Ecma335.MethodBodyAttributes * bool -> System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody
Public Function AddMethodBody (codeSize As Integer, Optional maxStack As Integer = 8, Optional exceptionRegionCount As Integer = 0, Optional hasSmallExceptionRegions As Boolean = true, Optional localVariablesSignature As StandaloneSignatureHandle = Nothing, Optional attributes As MethodBodyAttributes = System.Reflection.Metadata.Ecma335.MethodBodyAttributes.InitLocals, Optional hasDynamicStackAllocation As Boolean = false) As MethodBodyStreamEncoder.MethodBody

매개 변수

codeSize
Int32

명령에 예약될 바이트 수입니다.

maxStack
Int32

최대 스택 크기입니다.

exceptionRegionCount
Int32

예외 영역의 수입니다.

hasSmallExceptionRegions
Boolean

예외 영역을 작은 형식으로 인코딩해야 하는 경우 true이고, 그렇지 않으면 false입니다.

localVariablesSignature
StandaloneSignatureHandle

지역 변수의 시그니처 핸들입니다.

attributes
MethodBodyAttributes

메서드 본문 특성입니다.

hasDynamicStackAllocation
Boolean

메서드가 동적 로컬 메모리 풀에서 할당되는 경우(localloc 명령) true이고, 그렇지 않으면 false입니다.

반환

메서드 본문 스트림 내에서 인코딩된 본문의 오프셋입니다.

예외

codeSize, exceptionRegionCount 또는 maxStack이 허용되는 범위를 벗어났습니다.

적용 대상