Exposes the functionality of asIScriptFunction implementation.
        public void Execute()
        {
            func = null;
            var ret = ScriptContext_Execute(thisptr);

            if(ret == (int)asERetCodes.asERROR)
                throw new InvalidOperationException("Invalid context object, the context is not prepared, or it is not in suspended state.");
            if(ret == (int)asEContextState.asEXECUTION_ABORTED)
                throw new InvalidOperationException("The execution was aborted with a call to Abort.");
            if(ret == (int)asEContextState.asEXECUTION_SUSPENDED)
                throw new InvalidOperationException("The execution was suspended with a call to Suspend.");
            if(ret == (int)asEContextState.asEXECUTION_EXCEPTION)
                throw new InvalidOperationException("The execution ended with an exception.");
        }
 public void Prepare(ScriptFunction func)
 {
     ScriptContext_SetContextInfo(thisptr, info ?? "mono");
     var ret = ScriptContext_Prepare(thisptr, func.ThisPtr);
     if(ret == (int)asERetCodes.asCONTEXT_ACTIVE)
         throw new InvalidOperationException("Context still active or suspended.");
     this.func = func;
 }