コード例 #1
0
        public static MDbgEngine invoke_Method(this MethodInfo methodInfo, MDbgEngine engine, CorValue[] parameters)
        {
            //	var methodInfo = debugger.module("mscorlib").type("System.Console").method("Write");
            var module      = engine.process().ResolveClass(methodInfo.DeclaringType.FullName).Module;
            var corFunction = module.GetFunctionFromToken(methodInfo.MetadataToken);

            return(engine.invoke_Method(corFunction, parameters));
        }
コード例 #2
0
 public static MDbgEngine detach(this MDbgEngine engine)
 {
     if (engine.hasActiveProcess())
     {
         engine.process().Detach().WaitOne();
     }
     return(engine);
 }
コード例 #3
0
        public static CorGenericValue create_Object(this MDbgEngine engine, CorElementType elementType, object value)
        {
            var corEval      = engine.corEval();
            var corClass     = engine.process().ResolveClass(value.typeFullName());
            var corValue     = corEval.CreateValue(elementType, corClass);
            var genericValue = corValue.CastToGenericValue();

            return(genericValue.value(value));
        }