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

◆ MemberDescriptor() [4/4]

System.ComponentModel.MemberDescriptor.MemberDescriptor ( MemberDescriptor oldMemberDescriptor,
Attribute?[] newAttributes )
inlineprotected

Definition at line 136 of file MemberDescriptor.cs.

137 {
138 if (oldMemberDescriptor == null)
139 {
140 throw new ArgumentNullException("oldMemberDescriptor");
141 }
143 _displayName = oldMemberDescriptor.DisplayName;
144 _nameHash = _name.GetHashCode();
146 if (oldMemberDescriptor.Attributes.Count != 0)
147 {
148 foreach (Attribute attribute in oldMemberDescriptor.Attributes)
149 {
150 list.Add(attribute);
151 }
152 }
153 if (newAttributes != null)
154 {
155 foreach (Attribute item2 in newAttributes)
156 {
157 list.Add(item2);
158 }
159 }
160 _attributes = new Attribute[list.Count];
161 list.CopyTo(_attributes, 0);
162 _attributesFiltered = false;
164 }

References System.ComponentModel.MemberDescriptor._attributes, System.ComponentModel.MemberDescriptor._attributesFiltered, System.ComponentModel.MemberDescriptor._displayName, System.ComponentModel.MemberDescriptor._name, System.ComponentModel.MemberDescriptor._nameHash, System.ComponentModel.MemberDescriptor._originalAttributes, System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.list.