Class CilOperandBuilder
- Namespace
- AsmResolver.DotNet.Code.Cil
- Assembly
- AsmResolver.DotNet.dll
Provides a default implementation of the ICilOperandBuilder interface, that pulls metadata tokens from a metadata buffer.
public class CilOperandBuilder : ICilOperandBuilder
- Inheritance
-
CilOperandBuilder
- Implements
- Inherited Members
Constructors
CilOperandBuilder(IMetadataTokenProvider, IErrorListener)
Creates a new CIL operand builder that pulls metadata tokens from a mutable metadata buffer.
public CilOperandBuilder(IMetadataTokenProvider provider, IErrorListener errorListener)
Parameters
providerIMetadataTokenProvidererrorListenerIErrorListener
CilOperandBuilder(IMetadataTokenProvider, IErrorListener, object?)
Creates a new CIL operand builder that pulls metadata tokens from a mutable metadata buffer.
public CilOperandBuilder(IMetadataTokenProvider provider, IErrorListener errorListener, object? diagnosticSource)
Parameters
providerIMetadataTokenProvidererrorListenerIErrorListenerdiagnosticSourceobject
Methods
GetArgumentIndex(object?)
Transforms the provided argument operand into its argument index.
public int GetArgumentIndex(object? operand)
Parameters
operandobjectThe argument operand.
Returns
- int
The argument index.
GetMemberToken(object?)
Transforms the provided member into a metadata token that references the member.
public MetadataToken GetMemberToken(object? operand)
Parameters
operandobjectThe member.
Returns
- MetadataToken
The metadata token.
GetStringToken(object?)
Transforms the provided string operand into a string token.
public uint GetStringToken(object? operand)
Parameters
operandobjectThe string operand.
Returns
- uint
The string token.
GetVariableIndex(object?)
Transforms the provided variable operand into its variable index.
public int GetVariableIndex(object? operand)
Parameters
operandobjectThe variable operand.
Returns
- int
The variable index.