title: Use GuidRepresentation.Standard with MongoDB
body: <p>I am implementing a custom IBsonSerializer with the official MongoDB driver (C#). I am in the situation where I must serialize and deserialize a Guid.</p>
  
  <p>If I implement the Serialize method as follow, it works:</p>
  
  <pre><code>public void Serialize(BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
  {
      BsonBinaryData data = new BsonBinaryData(value, GuidRepresentation.CSharpLegacy);
      bsonWriter.WriteBinaryData(data);
  }
  </code></pre>
  
  <p>However I don't want the Guid representation to be CSharpLegacy, I want to use the standard representation. But if I change the Guid representation in that code, I get the following error:</p>
  
  <blockquote>
    <p>MongoDB.Bson.BsonSerializationException: The GuidRepresentation for the writer is CSharpLegacy, which requires the subType argument to be UuidLegacy, not UuidStandard.</p>
  </blockquote>
  
  <p>How do I serialize a Guid value using the standard representation?</p>