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

◆ attributeType

virtual ? Attribute this[[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor|DynamicallyAccessedMemberTypes.PublicFields)] Type System.ComponentModel.AttributeCollection.attributeType
get

Definition at line 34 of file AttributeCollection.cs.

35 {
36 get
37 {
38 if (attributeType == null)
39 {
40 throw new ArgumentNullException("attributeType");
41 }
43 {
44 if (_foundAttributeTypes == null)
45 {
46 _foundAttributeTypes = new AttributeEntry[5];
47 }
48 int i;
49 for (i = 0; i < 5; i++)
50 {
52 {
54 if (index != -1)
55 {
56 return Attributes[index];
57 }
59 }
60 if (_foundAttributeTypes[i].type == null)
61 {
62 break;
63 }
64 }
65 i = _index++;
66 if (_index >= 5)
67 {
68 _index = 0;
69 }
71 int num = Attributes.Length;
72 for (int j = 0; j < num; j++)
73 {
74 Attribute attribute = Attributes[j];
75 Type type = attribute.GetType();
76 if (type == attributeType)
77 {
79 return attribute;
80 }
81 }
82 for (int k = 0; k < num; k++)
83 {
84 Attribute attribute2 = Attributes[k];
85 if (attributeType.IsInstanceOfType(attribute2))
86 {
88 return attribute2;
89 }
90 }
93 }
94 }
95 }
Attribute? GetDefaultAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor|DynamicallyAccessedMemberTypes.PublicFields)] Type attributeType)
virtual ? Attribute this[[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor|DynamicallyAccessedMemberTypes.PublicFields)] Type attributeType

Referenced by System.ComponentModel.AttributeCollection.GetDefaultAttribute().