CompaniesHouse.NET icon indicating copy to clipboard operation
CompaniesHouse.NET copied to clipboard

Implement a way to expose the display names for enum values

Open kevbite opened this issue 3 years ago • 0 comments

Companies House have a list of enum values to their display name representation. It'd be good if the following was possible:

var result = await client.GetCompanyProfileAsync("10440441");

// England/Wales
var displayName = result.Data.GetDisplayName(x =>x.Jurisdiction);
Console.WriteLine(displayName);

We could do this by having [DisplayName] attributes on the enum values with the corresponding values in the yaml file (https://raw.githubusercontent.com/companieshouse/api-enumerations/master/constants.yml).

Follow up enhancement from issue #156

kevbite avatar Jun 24 '21 22:06 kevbite