protected TargetObject GetProperty(ScriptingContext context,
TargetPropertyInfo prop)
{
RuntimeInvokeFlags flags = context.GetRuntimeInvokeFlags ();
RuntimeInvokeResult result = context.RuntimeInvoke (
context.CurrentThread, prop.Getter, InstanceObject,
new TargetObject [0], flags);
if (result.ExceptionMessage != null)
throw new ScriptingException (
"Invocation of `{0}' raised an exception: {1}",
Name, result.ExceptionMessage);
return result.ReturnObject;
}