Mono.Debugger.Soft.TypeMirror.IsAssignableFrom C# (CSharp) Method

IsAssignableFrom() public method

public IsAssignableFrom ( TypeMirror c ) : bool
c TypeMirror
return bool
		public virtual bool IsAssignableFrom (TypeMirror c) {
			if (c == null)
				throw new ArgumentNullException ("c");

			CheckMirror (c);

			// This is complex so do it in the debuggee
			return vm.conn.Type_IsAssignableFrom (id, c.Id);
		}

Usage Example

Esempio n. 1
0
 internal ExceptionEventRequest(VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught) : base(vm, EventType.Exception)
 {
     if (exc_type != null)
     {
         CheckMirror(vm, exc_type);
         TypeMirror exception_type = vm.RootDomain.Corlib.GetType("System.Exception", false, false);
         if (!exception_type.IsAssignableFrom(exc_type))
         {
             throw new ArgumentException("The exception type does not inherit from System.Exception", "exc_type");
         }
     }
     this.exc_type = exc_type;
     this.caught   = caught;
     this.uncaught = uncaught;
 }