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

◆ GetCustomAttributes() [1/4]

static void System.Reflection.PseudoCustomAttribute.GetCustomAttributes ( RuntimeFieldInfo field,
RuntimeType caType,
ref RuntimeType::ListBuilder< Attribute > pcas )
inlinestaticpackage

Definition at line 165 of file PseudoCustomAttribute.cs.

166 {
167 bool flag = caType == typeof(object) || caType == typeof(Attribute);
168 if (!flag && !s_pca.Contains(caType))
169 {
170 return;
171 }
172 if (flag || caType == typeof(MarshalAsAttribute))
173 {
175 if (marshalAsCustomAttribute != null)
176 {
178 }
179 }
180 if (flag || caType == typeof(FieldOffsetAttribute))
181 {
183 if (marshalAsCustomAttribute != null)
184 {
186 }
187 }
188 if ((flag || caType == typeof(NonSerializedAttribute)) && (field.Attributes & FieldAttributes.NotSerialized) != 0)
189 {
190 pcas.Add(new NonSerializedAttribute());
191 }
192 }
void Add(TKey key, TValue value)
static FieldOffsetAttribute GetFieldOffsetCustomAttribute(RuntimeFieldInfo field)
static MarshalAsAttribute GetMarshalAsCustomAttribute(RuntimeParameterInfo parameter)
static readonly HashSet< RuntimeType > s_pca

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Reflection.PseudoCustomAttribute.GetFieldOffsetCustomAttribute(), System.Reflection.PseudoCustomAttribute.GetMarshalAsCustomAttribute(), and System.Reflection.PseudoCustomAttribute.s_pca.