static NativeDelegateWrapper()
{
var self = typeof (NativeDelegateWrapper);
ContextFieldInfo = self.GetField("context",
BindingFlags.Instance | BindingFlags.NonPublic);
if (ContextFieldInfo == null)
throw new MissingFieldException(self.FullName, "context");
CtorInfo = self.GetConstructor(
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
null, new[] {typeof (IntPtr), typeof (Type)}, null
);
if (CtorInfo == null)
throw new MissingMethodException(self.FullName, ".ctor(IntPtr, Type)");
}