Method Clone
Clone(MethodDefinition?, MethodDefinition?)
Clone the given method definition.
public static MethodDefinition? Clone(this MethodDefinition? o, MethodDefinition? c = null)
Parameters
oMethodDefinition- The original method.
cMethodDefinition- 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
boMethodBody- The original method body.
mMethodDefinition- 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
paramParameterDefinition- 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
attribCustomAttribute- 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
paramGenericParameter- The original generic parameter.
Returns
- GenericParameter
- A clone of the original generic parameter.