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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top