Closed Kritner closed 6 years ago
EnumeratedValueArgument is not the best here. It is meant for cases where you have a known set of primitive values you want to allow. E.g. 1,2,3,4,5,6
You can use plain ValueArgument:
ValueArgument<MyEnum> //(in code)
or
[ValueArgument(typeof(MyEnum),...)] //(in attributes)
it should work fine for you
Darn, guess no method for grabbing the list of valid values from the enum using that attribute either eh?
At a glance, I'm not seeing a method of using an
enum
along withEnumeratedValueArgument
, specifically when using a attribute style parsing target.I was hoping for something like:
or perhaps:
but that gives:
any ideas on this sort of functionality?