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

◆ SetExtProperties() [2/2]

static void System.Data.XSDSchema.SetExtProperties ( object instance,
XmlAttributeCollection attrs )
inlinestaticprivate

Definition at line 359 of file XSDSchema.cs.

360 {
361 PropertyCollection propertyCollection = null;
362 for (int i = 0; i < attrs.Count; i++)
363 {
364 if (attrs[i].NamespaceURI == "urn:schemas-microsoft-com:xml-msprop")
365 {
366 if (propertyCollection == null)
367 {
368 object value = TypeDescriptor.GetProperties(instance)["ExtendedProperties"].GetValue(instance);
369 propertyCollection = (PropertyCollection)value;
370 }
371 string key = XmlConvert.DecodeName(attrs[i].LocalName);
372 propertyCollection.Add(key, attrs[i].Value);
373 }
374 }
375 }
void Add(TKey key, TValue value)
static PropertyDescriptorCollection GetProperties([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType)
static ? string DecodeName(string? name)
Definition XmlConvert.cs:55

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.XmlConvert.DecodeName(), System.ComponentModel.TypeDescriptor.GetProperties(), System.key, and System.value.