public void rebuildHandlerFromFunctionName() { MyContract.RequireFieldNotNull(callback_instance, "callback_instance"); MyContract.RequireFieldNotNull(handler_function_name, "handler_function_name"); Type callback_instance_type = callback_instance.GetType(); MethodInfo callback_method = callback_instance_type.GetMethod(handler_function_name); this.handler = delegate() { MyContract.RequireFieldNotNull( callback_method, "callback_method" ); MyContract.RequireArgumentNotNull( callback_instance, "callback_instance" ); //Debug.Log("Invoking delegate function " // + handler_function_name // + " | " // + callback_method.Name); try { callback_method.Invoke(callback_instance, null); } catch (Exception e) { Debug.Log("An exception happened when invoking a callback: " + e.Message); } }; }
public BreakpointEntry() { dimension = Dimension.WIDTH; breakpoint = 0.0f; handler = null; handler_function_name = ""; }