<PackageReference Include="System.Reflection.Metadata" Version="11.0.0" />

System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder

public struct MethodBodyStreamEncoder
Provides an encoder for a method body stream.
namespace System.Reflection.Metadata.Ecma335 { public readonly struct MethodBodyStreamEncoder { public readonly struct MethodBody { public int Offset { get; } public Blob Instructions { get; } public ExceptionRegionEncoder ExceptionRegions { get; } } public BlobBuilder Builder { get; } public MethodBodyStreamEncoder(BlobBuilder builder); public MethodBody AddMethodBody(int codeSize, int maxStack, int exceptionRegionCount, bool hasSmallExceptionRegions, StandaloneSignatureHandle localVariablesSignature, MethodBodyAttributes attributes); public MethodBody AddMethodBody(int codeSize, int maxStack = 8, int exceptionRegionCount = 0, bool hasSmallExceptionRegions = true, StandaloneSignatureHandle localVariablesSignature = default(StandaloneSignatureHandle), MethodBodyAttributes attributes = MethodBodyAttributes.InitLocals, bool hasDynamicStackAllocation = false); public int AddMethodBody(InstructionEncoder instructionEncoder, int maxStack, StandaloneSignatureHandle localVariablesSignature, MethodBodyAttributes attributes); public int AddMethodBody(InstructionEncoder instructionEncoder, int maxStack = 8, StandaloneSignatureHandle localVariablesSignature = default(StandaloneSignatureHandle), MethodBodyAttributes attributes = MethodBodyAttributes.InitLocals, bool hasDynamicStackAllocation = false); } }