Use GUID instead of int for player-ids; ID is now unique and saved to player.xml-file

This commit is contained in:
Florian Küpper committed 2015-12-23 14:23:55 +01:00
1 parent 804647f480
commit e3497641dd
29 files changed
+275 -235

No files matched your search

+2
View File
@@ -213,6 +213,8 @@ namespace VocaluxeLib.Xml
return value;
}
}
if (type == typeof(Guid))
return Guid.Parse(node.InnerText);
if (type == typeof(string))
return node == null ? null : node.InnerText;
if (type.IsPrimitive)
+4
View File
@@ -96,6 +96,10 @@ namespace VocaluxeLib.Xml
writer.WriteEndElement();
}
}
else if (type == typeof(Guid))
{
writer.WriteElementString(name, value.ToString());
}
else if (type.IsNullable())
_WriteValue(writer, name, type.GetGenericArguments()[0], value, isAttribute, arrayItemName, nameAttribute);
else if (type.IsList() || type.IsArray)