name = vm.conn.Method_GetName (id);
return name;
}
- }
+ }
public TypeMirror DeclaringType {
get {
declaring_type = vm.GetType (vm.conn.Method_GetDeclaringType (id));
return declaring_type;
}
- }
+ }
public TypeMirror ReturnType {
get {
sb.Append(")");
return sb.ToString ();
}
- }
+ }
void GetInfo () {
if (info == null)
}
}
+ // Since protocol version 2.12
public bool IsGenericMethodDefinition {
get {
vm.CheckProtocolVersion (2, 12);
public bool IsGenericMethod {
get {
- vm.CheckProtocolVersion (2, 12);
- GetInfo ();
- return info.is_generic_method;
+ if (vm.Version.AtLeast (2, 12)) {
+ return GetInfo ().is_generic_method;
+ } else {
+ return Name.IndexOf ('`') != -1;
+ }
}
}
- public ParameterInfoMirror[] GetParameters () {
+ public ParameterInfoMirror[] GetParameters () {
if (param_info == null) {
var pi = vm.conn.Method_GetParamInfo (id);
param_info = new ParameterInfoMirror [pi.param_count];
return param_info;
}
- public ParameterInfoMirror ReturnParameter {
+ public ParameterInfoMirror ReturnParameter {
get {
if (ret_param == null)
GetParameters ();
debug_info = vm.conn.Method_GetDebugInfo (id);
return Array.AsReadOnly (debug_info.il_offsets);
}
- }
+ }
public IList<int> LineNumbers {
get {
debug_info = vm.conn.Method_GetDebugInfo (id);
return Array.AsReadOnly (debug_info.line_numbers);
}
- }
+ }
public string SourceFile {
get {
debug_info = vm.conn.Method_GetDebugInfo (id);
return debug_info.filename;
}
- }
+ }
public IList<Location> Locations {
get {
return debug_info.line_numbers [i];
}
return -1;
- }
+ }
public Location LocationAtILOffset (int il_offset) {
IList<Location> locs = Locations;
return meta;
}
}
- }
+ }
}
get {
return GetInfo ().name;
}
- }
+ }
public string Namespace {
get {
return GetInfo ().ns;
}
- }
+ }
public AssemblyMirror Assembly {
get {
}
}
- // Since protocol version 2.12
public bool IsGenericType {
get {
- vm.CheckProtocolVersion (2, 12);
- GetInfo ();
- return info.is_generic_type;
+ if (vm.Version.AtLeast (2, 12)) {
+ return GetInfo ().is_generic_type;
+ } else {
+ return Name.IndexOf ('`') != -1;
+ }
}
}