Djinn
Djinn
CC#
Created by Djinn on 9/23/2023 in #help
❔ EFCore migrations from existent database
No description
6 replies
CC#
Created by Djinn on 4/28/2023 in #help
✅ Error while injecting generic interface
9 replies
CC#
Created by Djinn on 11/15/2022 in #help
❔ Future Task
Hello, im writing one game and im wondering best way how task something. Like the player apply some effect and then in 5 minutes will lost it. How is the best way? I think create Task<T> of it is not good at all, or making some timing to handle and process such thing is quite not pratical (because its not much useble while game is running)
3 replies
CC#
Created by Djinn on 10/14/2022 in #help
XML Deserialize error
Error
System.InvalidOperationException: There is an error in XML document (4, 2).
---> System.InvalidOperationException: <database xmlns='http://www.iw.com/sns/platform/'> was not expected.
System.InvalidOperationException: There is an error in XML document (4, 2).
---> System.InvalidOperationException: <database xmlns='http://www.iw.com/sns/platform/'> was not expected.
Code
var serializer = new XmlSerializer(typeof(XmlUtils));
var reader = XmlReader.Create("test.xml", new XmlReaderSettings
{
IgnoreComments = true,
IgnoreWhitespace = true,
LineNumberOffset = 2,
IgnoreProcessingInstructions = true,
});
serializer.Deserialize(reader);
var serializer = new XmlSerializer(typeof(XmlUtils));
var reader = XmlReader.Create("test.xml", new XmlReaderSettings
{
IgnoreComments = true,
IgnoreWhitespace = true,
LineNumberOffset = 2,
IgnoreProcessingInstructions = true,
});
serializer.Deserialize(reader);
xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tns:database xmlns:tns="http://www.iw.com/sns/platform/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Group id="function_on">
<ItemSpec id="test" open="true">
</Group>
</tns:database>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tns:database xmlns:tns="http://www.iw.com/sns/platform/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Group id="function_on">
<ItemSpec id="test" open="true">
</Group>
</tns:database>
6 replies