I have to do reflection and late binding so i don't know if there is a way to speed things up. Thought I would give it a shot.
This snippet takes about 15 seconds to complete which is way too slow, but seeing how I need to read the metadata.
private static object InvokeCall(Type HostObjectType, Object HostObject, CallType callType, string PropertyOrMethodName, object[] args)
{
if (callType == CallType.Method)
{
return MyObjectType.InvokeMember(PropertyOrMethodName,System.Reflection.BindingFlags.InvokeMethod, null, myObject, args);
}
}