code-model

Controlling CodeModel's code output formatting: putting lines between namespace declarations

I'm making some experiments with Visual Studio's CodeModel. I tried creating a file with two namespaces in there through VS's Code Model: CodeModel codeModel = projItem.ContainingProject.CodeModel; codeModel.AddNamespace("Namespaces.FirstNamespace", "namespacestest.cs"); codeModel.AddNamespace("Namespaces.SecondNamespace", "namespaceste...

C# CodeModel Find out if CodeParameter is out or ref

I am using CodeModel inside of a T4 template to generate some code based from an interface. I am able to get the interface methods, parameter names, and parameter types but I can't seem to be able to find out wither the parameter is an out or ref parameter. http://msdn.microsoft.com/en-us/library/envdte.codeparameter.aspx foreach ( Cod...