-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.0
-
Component/s: None
-
None
-
Minor Change
Sadly, all existing C# drivers, including this official one, have been serializing Guids with the wrong byte order all along. This is because the byte array returned by Guid.ToByteArray returns an array where the first three groups (of 4, 2 and 2 bytes respectively) are reversed, as in little endian format.
This is not a problem as long as only C# drivers are reading and writing the Guids. However, all other drivers are storing UUIDs with the standard byte order, so it becomes difficult to interoperate between the C# and other drivers when using Guids.
This feature request is for a mechanism to allow C# applications to indicate when they would like Guids to be serialized using the standard byte order instead of Microsoft's internal byte order. For historical reasons everything will continue to default to Microsoft's byte order (so as not to break backward compatibility with existing code and data).
There will be a new enum:
public enum GuidByteOrder
{ Microsoft, Standard }To see all the changes involved in implementing this feature start by searching for occurrences of "GuidByteOrder" and follow the code changes from there (or look at the commit).