I'm calling
BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.CSharpLegacy));
to register GuidSerializer as CSharpLegacy in global scope. If called more than once, this calls throws exception with the following message
Message=There is already a serializer registered for type Guid.
Is there a way to check whether GuidSerializer is already registered? Would it make sense to unregister and re-register it again?
I know this error is expected, of course. I'm curious about confident (verified) approach to check if GuidSerializer is already registered before making such attempt.
The mongodb drvier version for C# is 2.11.4.