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

◆ IsDefined() [4/4]

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

Definition at line 53 of file PseudoCustomAttribute.cs.

54 {
55 bool flag = caType == typeof(object) || caType == typeof(Attribute);
56 if (!flag && !s_pca.Contains(caType))
57 {
58 return false;
59 }
60 if ((flag || caType == typeof(SerializableAttribute)) && (type.Attributes & TypeAttributes.Serializable) != 0)
61 {
62 return true;
63 }
64 if ((flag || caType == typeof(ComImportAttribute)) && (type.Attributes & TypeAttributes.Import) != 0)
65 {
66 return true;
67 }
68 return false;
69 }
static readonly HashSet< RuntimeType > s_pca

References System.Reflection.PseudoCustomAttribute.s_pca, and System.type.

Referenced by System.Reflection.CustomAttribute.IsDefined(), System.Reflection.CustomAttribute.IsDefined(), System.Reflection.CustomAttribute.IsDefined(), and System.Reflection.CustomAttribute.IsDefined().