Look at the first part of this video. It will show you how to collect properties from classes in Visual Studio.
EDIT:
If you do not have the time to view the video... Just use this snippet in the package manager console.
(Get-ProjectType Tag).Children | Where-Object{$.Kind -eq 4} | ForEach{$}
I think it is easier to find all properties with powershell and then send it into the T4, it´s hard work to use C# in the T4 to collect information.
T4Scaffolding in Visual Studio
Regards Uffe