j-maly / CommandLineParser

Command line parser. Declarative arguments support. Rich set of argument types (switches, enums, files, etc...). Mutually exclusive arguments validations.
MIT License
137 stars 30 forks source link

Extend argument for supporting Guid values #46

Closed delfuria closed 7 years ago

delfuria commented 7 years ago

I tried to extend the library for supporting Guid values. I have created a GuidArgumentAttribute and a GuidArgument classes following this link https://github.com/j-maly/CommandLineParser/wiki/Extensibility-&-custom-arguments but i cannot reach to execute because i get a MissingMethodException. What has been wrong ? Thanks

j-maly commented 7 years ago

Since Guid was not one of the types supported out of the box by ValueArgument, you would need to override this method: public virtual TValue Convert(string stringValue)

But now I've added Guid to ValueArgument directly as you suggested.

delfuria commented 7 years ago

Thanks a lot.