title: Serialize Hashset of enum in MongoDB
body: <p>I want to serialize in MongoDB, member Engines (HashSet of enum) as string to see the name as string and not a number 
  The class is : </p>
  
  <pre><code>public class EnginesPerFile
  {
      public Guid FileId { get; set; }
      public string Path { get; set; }
      public HashSet&lt;EngineType&gt; Engines { get; set; }
  }
  </code></pre>
  
  <p>I am trying to map like this :</p>
  
  <pre><code>BsonClassMap.RegisterClassMap&lt;EnginesPerFile&gt;(cm =&gt;
              {
                  cm.AutoMap();
                  cm.MapIdField(c =&gt; c.FileId);
                  cm.MapMember(c =&gt; c.Engines).SetSerializer(new EnumSerializer&lt;EngineType&gt;(BsonType.String));
              });
  </code></pre>
  
  <p>But i get an error:</p>
  
  <pre><code>Value type of serializer is EngineType and does not match member type System.Collections.Generic.HashSet`1[[Playground.Model.EngineType, Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].
  </code></pre>
  
  <p>Parameter name: serializer.</p>
  
  <p>How can i serialize hashset of enum in MongoDB?</p>