I have a source object that looks like this:
private class SourceObject {
public Enum1 EnumProp1 { get; set; }
public Enum2 EnumProp2 { get; set; }
}
Enums are decorated with a special attribute [Description]that provides a string representation, and I have an extension method .GetDescription()that returns it. How to match these enumeration properties with this extension?
I am trying to match an object like this:
private class DestinationObject {
public string Enum1Description { get; set; }
public string Enum2Description { get; set; }
}
I think this is the best option, but I canβt figure out how to add a formatter and specify which field will be displayed at the same time.
source
share