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

◆ AddAttributesToList()

static void System.Attribute.AddAttributesToList ( List< Attribute > attributeList,
Attribute[] attributes,
Dictionary< Type, AttributeUsageAttribute > types )
inlinestaticprivateinherited

Definition at line 298 of file Attribute.cs.

299 {
300 for (int i = 0; i < attributes.Length; i++)
301 {
302 Type type = attributes[i].GetType();
304 if (value == null)
305 {
307 if (value.Inherited)
308 {
309 attributeList.Add(attributes[i]);
310 }
311 }
312 else if (value.Inherited && value.AllowMultiple)
313 {
314 attributeList.Add(attributes[i]);
315 }
316 }
317 }
static AttributeUsageAttribute InternalGetAttributeUsage(Type type)
Definition Attribute.cs:319
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Attribute.InternalGetAttributeUsage(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.type, and System.value.

Referenced by System.Attribute.InternalGetCustomAttributes(), and System.Attribute.InternalGetCustomAttributes().