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

◆ AddExtendedProperties() [2/2]

static void System.Data.XmlTreeGen.AddExtendedProperties ( PropertyCollection props,
XmlElement node,
Type type )
inlinestaticpackage

Definition at line 60 of file XmlTreeGen.cs.

61 {
62 if (props == null)
63 {
64 return;
65 }
66 foreach (DictionaryEntry prop in props)
67 {
68 string text = ((!(prop.Key is INullable)) ? Convert.ToString(prop.Key, CultureInfo.InvariantCulture) : ((string)SqlConvert.ChangeTypeForXML(prop.Key, typeof(string))));
70 if (type == typeof(DataRelation))
71 {
72 text = "rel_" + text;
73 }
74 else if (type == typeof(ForeignKeyConstraint))
75 {
76 text = "fk_" + text;
77 }
78 node.SetAttribute(XmlConvert.EncodeLocalName(text), "urn:schemas-microsoft-com:xml-msprop", value);
79 }
80 }
static object ConvertFromBigInteger(BigInteger value, Type type, IFormatProvider formatProvider)
static object ChangeTypeForXML(object value, Type type)
static CultureInfo InvariantCulture
static ? string EncodeLocalName(string? name)
Definition XmlConvert.cs:49

References System.Data.Common.BigInteger, System.Data.Common.SqlConvert.ChangeTypeForXML(), System.Data.Common.BigIntegerStorage.ConvertFromBigInteger(), System.Xml.Dictionary, System.Xml.XmlConvert.EncodeLocalName(), System.Globalization.CultureInfo.InvariantCulture, System.text, System.Convert.ToString(), System.type, and System.value.