Hi,
I did a small test regarding Guid serialization with the c# driver 2.11.
Here is my code
BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));
BsonDocument doc = new BsonDocument
{
{"Standard" ,new BsonBinaryData( new Guid( "1A76AD2A-4FF6-4291-860E-51C5C34AA890"),GuidRepresentation.Standard) },
{"CSharpLegacy" ,new BsonBinaryData( new Guid( "1A76AD2A-4FF6-4291-860E-51C5C34AA890"),GuidRepresentation.CSharpLegacy) }
};
When looked the the document , it looked like this:
doc = { {
"Standard": CSUUID("1a76ad2a-4ff6-4291-860e-51c5c34aa890"),
"CSharpLegacy": CSUUID("1a76ad2a-4ff6-4291-860e-51c5c34aa890")
}
}
I would expect it to look like this:
doc = { {
"Standard": UUID("1a76ad2a-4ff6-4291-860e-51c5c34aa890"),
"CSharpLegacy": CSUUID("1a76ad2a-4ff6-4291-860e-51c5c34aa890")
}
}
Am I right?
Thanks,
Itzhak