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

◆ InitializeInvocationFlags()

INVOCATION_FLAGS System.Reflection.RtFieldInfo.InitializeInvocationFlags ( )
inlineprivate

Definition at line 52 of file RtFieldInfo.cs.

53 {
54 Type declaringType = DeclaringType;
55 INVOCATION_FLAGS iNVOCATION_FLAGS = INVOCATION_FLAGS.INVOCATION_FLAGS_UNKNOWN;
56 if (declaringType != null && declaringType.ContainsGenericParameters)
57 {
58 iNVOCATION_FLAGS |= INVOCATION_FLAGS.INVOCATION_FLAGS_NO_INVOKE;
59 }
60 if (iNVOCATION_FLAGS == INVOCATION_FLAGS.INVOCATION_FLAGS_UNKNOWN)
61 {
62 if ((m_fieldAttributes & FieldAttributes.InitOnly) != 0)
63 {
64 iNVOCATION_FLAGS |= INVOCATION_FLAGS.INVOCATION_FLAGS_IS_CTOR;
65 }
66 if ((m_fieldAttributes & FieldAttributes.HasFieldRVA) != 0)
67 {
68 iNVOCATION_FLAGS |= INVOCATION_FLAGS.INVOCATION_FLAGS_IS_CTOR;
69 }
70 Type fieldType = FieldType;
71 if (fieldType.IsPointer || fieldType.IsEnum || fieldType.IsPrimitive)
72 {
73 iNVOCATION_FLAGS |= INVOCATION_FLAGS.INVOCATION_FLAGS_FIELD_SPECIAL_CAST;
74 }
75 }
76 return m_invocationFlags = iNVOCATION_FLAGS | INVOCATION_FLAGS.INVOCATION_FLAGS_INITIALIZED;
77 }
INVOCATION_FLAGS m_invocationFlags
FieldAttributes m_fieldAttributes

References System.Type.ContainsGenericParameters, System.Reflection.RuntimeFieldInfo.DeclaringType, System.Reflection.RtFieldInfo.FieldType, System.Type.IsEnum, System.Type.IsPointer, System.Type.IsPrimitive, System.Reflection.RtFieldInfo.m_fieldAttributes, and System.Reflection.RtFieldInfo.m_invocationFlags.