MethodBodyStreamEncoder.AddMethodBody Metod

Definition

Överlagringar

Name Description
AddMethodBody(InstructionEncoder, Int32, StandaloneSignatureHandle, MethodBodyAttributes)

Kodar en metodtext och lägger till den i metodens brödtextström.

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

Kodar en metodtext och lägger till den i metodens brödtextström, med den angivna instruktionskodaren, maximal stackstorlek, signaturhandtaget för lokala variabler, metodkroppsattribut och gör det möjligt att ange om metoden ska allokeras från den dynamiska lokala minnespoolen eller inte.

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

Kodar en metodtext och lägger till den i metodens brödtextström, med hjälp av den angivna kodstorleken, maximal stackstorlek, antal undantagsregioner, signaturhandtaget för lokala variabler, metodtextattribut och tillåter att du anger om undantagsregionerna ska kodas i litet format eller inte.

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

Kodar en metodtext och lägger till den i metodens brödtextström, med hjälp av den angivna kodstorleken, maximal stackstorlek, antalet undantagsregioner, signaturhandtaget för lokala variabler, metodtextattribut, vilket gör det möjligt att ange om undantagsregionerna ska kodas i litet format eller inte, och tillåter att den anger om metoden ska allokeras från den dynamiska lokala minnespoolen eller inte.

AddMethodBody(InstructionEncoder, Int32, StandaloneSignatureHandle, MethodBodyAttributes)

Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs

Kodar en metodtext och lägger till den i metodens brödtextström.

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

Parametrar

instructionEncoder
InstructionEncoder

Instruktionskodaren.

maxStack
Int32

Maximal stackstorlek.

localVariablesSignature
StandaloneSignatureHandle

Signaturhandtaget för lokala variabler.

attributes
MethodBodyAttributes

Metodens brödtextattribut.

Returer

Förskjutningen av den kodade brödtexten i metodens brödtextström.

Undantag

instructionEncoder har standardvärdet.

maxStack är utom räckhåll [0, UInt16.MaxValue].

En etikett som är mål för en gren i instruktionsströmmen har inte markerats eller avståndet mellan en greninstruktion och måletiketten passar inte storleken på instruktionsoperänden.

Gäller för

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

Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs

Kodar en metodtext och lägger till den i metodens brödtextström, med den angivna instruktionskodaren, maximal stackstorlek, signaturhandtaget för lokala variabler, metodkroppsattribut och gör det möjligt att ange om metoden ska allokeras från den dynamiska lokala minnespoolen eller inte.

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

Parametrar

instructionEncoder
InstructionEncoder

Instruktionskodaren.

maxStack
Int32

Maximal stackstorlek.

localVariablesSignature
StandaloneSignatureHandle

Signaturhandtaget för lokala variabler.

attributes
MethodBodyAttributes

Metodens brödtextattribut.

hasDynamicStackAllocation
Boolean

true om metoden allokerar från den dynamiska lokala minnespoolen (IL innehåller instruktionen localloc ), false annars.

Returer

Förskjutningen av den kodade brödtexten i metodens brödtextström.

Undantag

instructionEncoder har standardvärdet.

maxStack är utom räckhåll [0, UInt16.MaxValue].

En etikett som är mål för en gren i instruktionsströmmen har inte markerats eller avståndet mellan en greninstruktion och måletiketten passar inte storleken på instruktionsoperänden.

Gäller för

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

Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs

Kodar en metodtext och lägger till den i metodens brödtextström, med hjälp av den angivna kodstorleken, maximal stackstorlek, antal undantagsregioner, signaturhandtaget för lokala variabler, metodtextattribut och tillåter att du anger om undantagsregionerna ska kodas i litet format eller inte.

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

Parametrar

codeSize
Int32

Antalet byte som ska reserveras för instruktioner.

maxStack
Int32

Maximal stackstorlek.

exceptionRegionCount
Int32

Antalet undantagsregioner.

hasSmallExceptionRegions
Boolean

true om undantagsregionerna ska kodas i litet format. false Annars.

localVariablesSignature
StandaloneSignatureHandle

Signaturhandtaget för lokala variabler.

attributes
MethodBodyAttributes

Metodens brödtextattribut.

Returer

Förskjutningen av den kodade brödtexten i metodens brödtextström.

Undantag

codeSize, exceptionRegionCount, eller maxStack ligger inte inom det tillåtna intervallet.

Gäller för

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

Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs
Källa:
MethodBodyStreamEncoder.cs

Kodar en metodtext och lägger till den i metodens brödtextström, med hjälp av den angivna kodstorleken, maximal stackstorlek, antalet undantagsregioner, signaturhandtaget för lokala variabler, metodtextattribut, vilket gör det möjligt att ange om undantagsregionerna ska kodas i litet format eller inte, och tillåter att den anger om metoden ska allokeras från den dynamiska lokala minnespoolen eller inte.

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

Parametrar

codeSize
Int32

Antalet byte som ska reserveras för instruktioner.

maxStack
Int32

Maximal stackstorlek.

exceptionRegionCount
Int32

Antalet undantagsregioner.

hasSmallExceptionRegions
Boolean

true om undantagsregionerna ska kodas i litet format. false Annars.

localVariablesSignature
StandaloneSignatureHandle

Signaturhandtaget för lokala variabler.

attributes
MethodBodyAttributes

Metodens brödtextattribut.

hasDynamicStackAllocation
Boolean

true om metoden allokerar från den dynamiska lokala minnespoolen (instruktionen localloc ), false annars.

Returer

Förskjutningen av den kodade brödtexten i metodens brödtextström.

Undantag

codeSize, exceptionRegionCount, eller maxStack ligger inte inom det tillåtna intervallet.

Gäller för