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

System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder

public struct ExceptionRegionEncoder
public BlobBuilder Builder { get; }

The underlying builder.

public bool HasSmallFormat { get; }

true if the encoder uses small format.

public static bool IsSmallExceptionRegion(int startOffset, int length)

Returns true if the region fits small format.

public static bool IsSmallRegionCount(int exceptionRegionCount)

Returns true if the number of exception regions first small format.

public ExceptionRegionEncoder Add(ExceptionRegionKind kind, int tryOffset, int tryLength, int handlerOffset, int handlerLength, EntityHandle catchType = default, int filterOffset = 0)

Adds an exception clause.

public ExceptionRegionEncoder AddCatch(int tryOffset, int tryLength, int handlerOffset, int handlerLength, EntityHandle catchType)

Adds a fault clause.

public ExceptionRegionEncoder AddFault(int tryOffset, int tryLength, int handlerOffset, int handlerLength)

Adds a fault clause.

public ExceptionRegionEncoder AddFilter(int tryOffset, int tryLength, int handlerOffset, int handlerLength, int filterOffset)

Adds a fault clause.

public ExceptionRegionEncoder AddFinally(int tryOffset, int tryLength, int handlerOffset, int handlerLength)

Adds a finally clause.