MethodAttributes GetMethodAttributes(Method method)
{
MethodAttributes attributes = MethodAttributes.HideBySig;
if (method.ExplicitInfo != null)
attributes |= MethodAttributes.NewSlot;
if (IsPInvoke(method))
{
Debug.Assert(method.IsStatic);
attributes |= MethodAttributes.PinvokeImpl;
}
attributes |= MethodAttributesFor(method);
return attributes;
}