projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Mono.Debugger.Soft] Added TypeMirror.IsNested
[mono.git]
/
mcs
/
class
/
Mono.Debugger.Soft
/
Mono.Debugger.Soft
/
TypeMirror.cs
diff --git
a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
index e7baa44fae09943942b1353621458bebe76374b9..437689163ec93171b5fee5fdd4525562fdb88520 100644
(file)
--- a/
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
+++ b/
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
@@
-192,6
+192,14
@@
namespace Mono.Debugger.Soft
}
}
}
}
+ public bool IsNested {
+ get {
+ var masked = (Attributes & TypeAttributes.VisibilityMask);
+
+ return masked >= TypeAttributes.NestedPublic && masked <= TypeAttributes.NestedFamORAssem;
+ }
+ }
+
public bool IsNestedAssembly {
get {
return (Attributes & TypeAttributes.VisibilityMask) == TypeAttributes.NestedAssembly;
public bool IsNestedAssembly {
get {
return (Attributes & TypeAttributes.VisibilityMask) == TypeAttributes.NestedAssembly;
@@
-816,13
+824,24
@@
namespace Mono.Debugger.Soft
#endif
public Value NewInstance (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
#endif
public Value NewInstance (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
- return
ObjectMirror.InvokeMethod (vm, thread, method, null
, arguments, InvokeOptions.None);
+ return
NewInstance (thread, method
, arguments, InvokeOptions.None);
}
public Value NewInstance (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options) {
}
public Value NewInstance (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options) {
+ if (method == null)
+ throw new ArgumentNullException ("method");
+
+ if (!method.IsConstructor)
+ throw new ArgumentException ("The method must be a constructor.", "method");
+
return ObjectMirror.InvokeMethod (vm, thread, method, null, arguments, options);
}
return ObjectMirror.InvokeMethod (vm, thread, method, null, arguments, options);
}
+ // Since protocol version 2.31
+ public Value NewInstance () {
+ return vm.GetObject (vm.conn.Type_CreateInstance (id));
+ }
+
// Since protocol version 2.11
public TypeMirror[] GetInterfaces () {
if (ifaces == null)
// Since protocol version 2.11
public TypeMirror[] GetInterfaces () {
if (ifaces == null)