internal override uint GetOneTimeSpecificFlags()
{
uint invocationFlags = INVOCATION_FLAGS_IS_CTOR; // this is a given
if (
(DeclaringType != null && DeclaringType.IsAbstract) ||
(IsStatic)
)
invocationFlags |= INVOCATION_FLAGS_NO_CTOR_INVOKE;
else if (DeclaringType == typeof(void))
invocationFlags |= INVOCATION_FLAGS_NO_INVOKE;
// Check for attempt to create a delegate class, we demand unmanaged
// code permission for this since it's hard to validate the target address.
else if (typeof(Delegate).IsAssignableFrom(DeclaringType))
invocationFlags |= INVOCATION_FLAGS_IS_DELEGATE_CTOR;
return invocationFlags;
}
#endregion