Table of Contents

Method Clone

Namespace
MonoMod.Utils
Assembly
MonoMod.Utils.dll

Clone(MethodDefinition?, MethodDefinition?)

Clone the given method definition.
public static MethodDefinition? Clone(this MethodDefinition? o, MethodDefinition? c = null)

Parameters

o MethodDefinition
The original method.
c MethodDefinition
The method definition to apply the cloning process onto, or null to create a new method.

Returns

MethodDefinition
A clone of the original method.

Clone(MethodBody?, MethodDefinition)

Clone the given method body.
public static MethodBody? Clone(this MethodBody? bo, MethodDefinition m)

Parameters

bo MethodBody
The original method body.
m MethodDefinition
The method which will own the newly cloned method body.

Returns

MethodBody
A clone of the original method body.

Clone(ParameterDefinition)

Clone the given parameter definition.
public static ParameterDefinition Clone(this ParameterDefinition param)

Parameters

param ParameterDefinition
The original parameter definition.

Returns

ParameterDefinition
A clone of the original parameter definition.

Clone(CustomAttribute)

Clone the given custom attribute.
public static CustomAttribute Clone(this CustomAttribute attrib)

Parameters

attrib CustomAttribute
The original custom attribute.

Returns

CustomAttribute
A clone of the original custom attribute.

Clone(GenericParameter)

Clone the given generic parameter.
public static GenericParameter Clone(this GenericParameter param)

Parameters

param GenericParameter
The original generic parameter.

Returns

GenericParameter
A clone of the original generic parameter.