Dropdown display names in properties of custom activity

custom_activities

#1

Hi guys,

I’m building a custom activity which takes a file and processes it to a different output. There are 3 possible paths for this (Text -> JSON, JSON -> JSON and JSON -> CSV). I’ve made a dropdown for the properties panel with these options, but I want to change the display names, as enums don’t allow spaces or special characters. I’ve tried using the following code, but it doesn’t work. Any help is appreciated!

public enum ddEnum
    {
        [Display(Name = "Text -> JSON")]
        TextJSON,
        [Display(Name = "JSON -> JSON")]
        JSONJSON,
        [Display(Name = "JSON -> CSV")]
        JSONCSV
    }

    [Category("Input")]
    [RequiredArgument]
    [Description("The preferred input and output formats.")]
    [DisplayName("Input / Output Formats")]
    public ddEnum InputOutput { get; set; }

image