Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2096

Make EnumRepresentationConvention also affect collections of Enums

    • Fully Compatible

      As someone mentioned on SO (https://stackoverflow.com/questions/47313022/mongodb-c-sharp-driver-serializing-listenum-as-string), the following cases are currently not handled by the EnumRepresentationConvention:

      List<EnumType> { get; set; }
      List<List<List<EnumType>>> { get; set; }
      Dictionary<EnumType, OtherType> { get; set; }
      Dictionary<OtherType, EnumType> { get; set; }
      

      The convention currently only works on straight Enums as in

      EnumType E { get; set; }
      

      and nullable Enums as in:

      EnumType? E { get; set; }
      

      This improvement is about making sure that (even nested) collections of the various kinds are affected by the convention as expected.

            Assignee:
            Unassigned Unassigned
            Reporter:
            daniel.hegener@gmx.net Daniel Hegener
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: