Method GetID
GetID(MethodReference, string?, string?, bool, bool)
Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil.
public static string GetID(this MethodReference method, string? name = null, string? type = null, bool withType = true, bool simple = false)
Parameters
method
MethodReference- The method to get the ID for.
name
string- The name to use instead of the reference's own name.
type
string- The ID to use instead of the reference's declaring type ID.
withType
bool- Whether the type ID should be included or not. System.Reflection avoids it by default.
simple
bool- Whether the ID should be "simple" (name only).
Returns
- string
- The ID.
GetID(CallSite)
Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil.
public static string GetID(this CallSite method)
Parameters
method
CallSite- The call site to get the ID for.
Returns
- string
- The ID.
GetID(MethodBase, string?, string?, bool, bool, bool)
Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil.
public static string GetID(this MethodBase method, string? name = null, string? type = null, bool withType = true, bool proxyMethod = false, bool simple = false)
Parameters
method
MethodBase- The method to get the ID for.
name
string- The name to use instead of the reference's own name.
type
string- The ID to use instead of the reference's declaring type ID.
withType
bool- Whether the type ID should be included or not. System.Reflection avoids it by default.
proxyMethod
bool- Whether the method is regarded as a proxy method or not. Setting this paramater to true will skip the first parameter.
simple
bool- Whether the ID should be "simple" (name only).
Returns
- string
- The ID.