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

◆ ImportAttributeMember()

void System.Xml.Serialization.XmlSchemaImporter.ImportAttributeMember ( XmlSchemaAttribute attribute,
string identifier,
CodeIdentifiers members,
CodeIdentifiers membersScope,
string ns )
inlineprivate

Definition at line 1492 of file XmlSchemaImporter.cs.

1493 {
1495 if (attributeAccessor != null)
1496 {
1497 MemberMapping memberMapping = new MemberMapping();
1498 memberMapping.Elements = Array.Empty<ElementAccessor>();
1500 memberMapping.Name = CodeIdentifier.MakeValid(Accessor.UnescapeName(attributeAccessor.Name));
1502 if (memberMapping.Name.EndsWith("Specified", StringComparison.Ordinal))
1503 {
1504 string name = memberMapping.Name;
1506 membersScope.Remove(name);
1507 }
1509 memberMapping.TypeDesc = (attributeAccessor.IsList ? attributeAccessor.Mapping.TypeDesc.CreateArrayTypeDesc() : attributeAccessor.Mapping.TypeDesc);
1510 if ((attribute.Use == XmlSchemaUse.Optional || attribute.Use == XmlSchemaUse.None) && memberMapping.TypeDesc.IsValueType && !attribute.HasDefault && !memberMapping.TypeDesc.HasIsEmpty)
1511 {
1512 memberMapping.CheckSpecified = SpecifiedAccessor.ReadWrite;
1513 }
1514 }
1515 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
AttributeAccessor ImportAttribute(XmlSchemaAttribute attribute, string identifier, string ns, XmlSchemaAttribute defaultValueProvider)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, System.Xml.Serialization.XmlSchemaImporter.ImportAttribute(), System.Xml.Serialization.CodeIdentifier.MakeValid(), System.Collections.Generic.Dictionary< TKey, TValue >.Remove(), and System.Xml.Serialization.Accessor.UnescapeName().

Referenced by System.Xml.Serialization.XmlSchemaImporter.ImportAttributeGroupMembers(), and System.Xml.Serialization.XmlSchemaImporter.ImportTypeMembers().