Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top