GuOrg / Gu.Xml

MIT License
1 stars 0 forks source link

Handle all primitive types. #1

Open JohanLarsson opened 5 years ago

JohanLarsson commented 5 years ago

Specification: https://www.w3.org/TR/xmlschema-2/

JohanLarsson commented 5 years ago

[TestCase('a')]
[TestCase('\t')]
public void Char(char value)
{
    var with = new WithMutable<char> { Value = value };
    var actual = Xml.Serialize(with);
    var expected = Reference.Xml(with);
    Assert.AreEqual(expected, actual);
}
jnm2 commented 5 years ago

Where would BigInteger fall in the grand scheme of things?

jnm2 commented 5 years ago

IntPtr and UIntPtr are primitive types too, I think.

jnm2 commented 5 years ago

Would byte[] as base64 be considered an XML primitive?

JohanLarsson commented 5 years ago

@jnm2 how would you like the defaults for serializing DateTime & DateTimeOffset? I'm thinking UTC and ISO8601 as default.

jnm2 commented 5 years ago

ISO 8601 would be my preference.