| 2893 | } |
| 2894 | |
| 2895 | bool BfModule::CheckProtection(BfProtection protection, BfTypeDef* checkType, bool allowProtected, bool allowPrivate) |
| 2896 | { |
| 2897 | if ((protection == BfProtection_Public) || |
| 2898 | (((protection == BfProtection_Protected) || (protection == BfProtection_ProtectedInternal)) && (allowProtected)) || |
| 2899 | ((protection == BfProtection_Private) && (allowPrivate))) |
| 2900 | return true; |
| 2901 | if ((mAttributeState != NULL) && (mAttributeState->mCustomAttributes != NULL) && (mAttributeState->mCustomAttributes->Contains(mCompiler->mFriendAttributeTypeDef))) |
| 2902 | { |
| 2903 | mAttributeState->mUsed = true; |
| 2904 | return true; |
| 2905 | } |
| 2906 | if (((protection == BfProtection_Internal) || (protection == BfProtection_ProtectedInternal)) && (checkType != NULL)) |
| 2907 | { |
| 2908 | if (CheckInternalProtection(checkType)) |
| 2909 | return true; |
| 2910 | } |
| 2911 | return false; |
| 2912 | } |
| 2913 | |
| 2914 | void BfModule::GetAccessAllowed(BfTypeInstance* checkType, bool &allowProtected, bool &allowPrivate) |
| 2915 | { |
no test coverage detected