public IntPtr GetFunction (Type type)
{
// As we cannot get a function pointer from a dynamic FieldInfo,
// we need to retrieve the defined FieldInfo.
FieldInfo fieldInfo = type.GetField (this.ProxyDelegateFieldInfo.Name);
return Marshal.GetFunctionPointerForDelegate ((Delegate)fieldInfo.GetValue (null));
}
}