Question

I am using a T4 to create my interface, however the only issue I am having is if my methods have optional parameters, I am not adding them to the interface.

I'm using EnvDTE to get the information and I have the CodeParameter, but do not see a way to tell it parameter has optional value.

Anyway to tell if the parameter has an optional value?

Était-ce utile?

La solution

Try using CodeParameter2 instead. It has a ParameterKind property, which can be set to vsCMParameterKindOptional, and a DefaultValue property.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top