Class MultiMethodBodySerializer
- Namespace
- AsmResolver.DotNet.Code
- Assembly
- AsmResolver.DotNet.dll
Provides an implementation for the IMethodBodySerializer that multiplexes two instances of the IMethodBodySerializer interface together, and uses one for serializing managed method bodies, and the other for unmanaged method bodies.
public class MultiMethodBodySerializer : IMethodBodySerializer
- Inheritance
-
MultiMethodBodySerializer
- Implements
- Inherited Members
Constructors
MultiMethodBodySerializer(IMethodBodySerializer, IMethodBodySerializer)
Creates a new instance of the MultiMethodBodySerializer class.
public MultiMethodBodySerializer(IMethodBodySerializer managedSerializer, IMethodBodySerializer unmanagedSerializer)
Parameters
managedSerializer
IMethodBodySerializerThe serializer responsible for serializing managed CIL method bodies.
unmanagedSerializer
IMethodBodySerializerThe serializer responsible for serializing unmanaged CIL method bodies.
Properties
ManagedSerializer
Gets or sets the method body serializer responsible for serializing managed CIL method bodies.
public IMethodBodySerializer ManagedSerializer { get; set; }
Property Value
UnmanagedSerializer
Gets or sets the method body serializer responsible for serializing unmanaged method bodies.
public IMethodBodySerializer UnmanagedSerializer { get; set; }
Property Value
Methods
SerializeMethodBody(MethodBodySerializationContext, MethodDefinition)
Serializes the body of the provided method definition into a segment that can be added to a PE image.
public ISegmentReference SerializeMethodBody(MethodBodySerializationContext context, MethodDefinition method)
Parameters
context
MethodBodySerializationContextThe context in which the serializer is situated in.
method
MethodDefinitionThe method to serialize the method body for.
Returns
- ISegmentReference
A reference to a segment that encodes the method body.