Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsDefined() [2/4]

static bool System.Reflection.PseudoCustomAttribute.IsDefined ( RuntimeMethodInfo method,
RuntimeType caType )
inlinestaticpackage

Definition at line 92 of file PseudoCustomAttribute.cs.

93 {
94 bool flag = caType == typeof(object) || caType == typeof(Attribute);
95 if (!flag && !s_pca.Contains(caType))
96 {
97 return false;
98 }
99 if ((flag || caType == typeof(DllImportAttribute)) && (method.Attributes & MethodAttributes.PinvokeImpl) != 0)
100 {
101 return true;
102 }
103 if ((flag || caType == typeof(PreserveSigAttribute)) && (method.GetMethodImplementationFlags() & MethodImplAttributes.PreserveSig) != 0)
104 {
105 return true;
106 }
107 return false;
108 }
static readonly HashSet< RuntimeType > s_pca

References System.Reflection.PseudoCustomAttribute.s_pca.