Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle all primitive types. #1

Open
22 of 24 tasks
JohanLarsson opened this issue Sep 9, 2018 · 6 comments
Open
22 of 24 tasks

Handle all primitive types. #1

JohanLarsson opened this issue Sep 9, 2018 · 6 comments

Comments

@JohanLarsson
Copy link
Member

JohanLarsson commented Sep 9, 2018

  • System.BigInteger
  • System.Boolean
  • System.Byte
  • System.Char
  • System.DateTime
  • System.DateTimeOffset
  • System.Decimal
  • System.Double
  • System.Enum ([Flags])
  • System.Guid
  • System.Int16
  • System.Int32
  • System.Int64
  • System.IntPtr
  • System.Object
  • System.SByte
  • System.Single
  • System.String
  • System.TimeSpan
  • System.UInt16
  • System.UInt32
  • System.UInt64
  • System.UIntPtr
  • System.Url

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

JohanLarsson added a commit that referenced this issue Sep 9, 2018
@JohanLarsson
Copy link
Member Author

[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);
}

JohanLarsson added a commit that referenced this issue Sep 9, 2018
JohanLarsson added a commit that referenced this issue Sep 9, 2018
JohanLarsson added a commit that referenced this issue Sep 9, 2018
JohanLarsson added a commit that referenced this issue Sep 9, 2018
JohanLarsson added a commit that referenced this issue Sep 9, 2018
JohanLarsson added a commit that referenced this issue Sep 9, 2018
@jnm2
Copy link

jnm2 commented Sep 10, 2018

Where would BigInteger fall in the grand scheme of things?

@jnm2
Copy link

jnm2 commented Sep 10, 2018

IntPtr and UIntPtr are primitive types too, I think.

@jnm2
Copy link

jnm2 commented Sep 10, 2018

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

@JohanLarsson
Copy link
Member Author

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

@jnm2
Copy link

jnm2 commented Sep 10, 2018

ISO 8601 would be my preference.

JohanLarsson added a commit that referenced this issue Sep 12, 2018
JohanLarsson added a commit that referenced this issue Sep 12, 2018
JohanLarsson added a commit that referenced this issue Sep 12, 2018
JohanLarsson added a commit that referenced this issue Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants