Exemplo n.º 1
0
 private static bool AllowCriticalCustomAttributes(MethodBase method)
 {
     if (method.IsSecurityTransparent)
     {
         return(CustomAttribute.SpecialAllowCriticalAttributes((RuntimeType)method.DeclaringType));
     }
     return(true);
 }
Exemplo n.º 2
0
 private static bool AllowCriticalCustomAttributes(RuntimeFieldInfo field)
 {
     if (field.IsSecurityTransparent)
     {
         return(CustomAttribute.SpecialAllowCriticalAttributes((RuntimeType)field.DeclaringType));
     }
     return(true);
 }
 // Token: 0x0600445F RID: 17503 RVA: 0x000FAEFC File Offset: 0x000F90FC
 private static bool AllowCriticalCustomAttributes(RuntimeType type)
 {
     if (type.IsGenericParameter)
     {
         MethodBase declaringMethod = type.DeclaringMethod;
         if (declaringMethod != null)
         {
             return(CustomAttribute.AllowCriticalCustomAttributes(declaringMethod));
         }
         type = (type.DeclaringType as RuntimeType);
     }
     return(!type.IsSecurityTransparent || CustomAttribute.SpecialAllowCriticalAttributes(type));
 }