in Backend/ReSharperPlugin/ForTea.ReSharperPlugin/T4ReSharperEnvironment.cs [72:100]
private IList<VirtualFileSystemPath> ReadIncludePaths()
{
string registryKey = _vsEnvironmentInformation.VisualStudioGlobalRegistryPath
+ @"_Config\TextTemplating\IncludeFolders\.tt";
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(registryKey))
{
if (key == null)
return EmptyList<VirtualFileSystemPath>.InstanceList;
string[] valueNames = key.GetValueNames();
if (valueNames.Length == 0)
return EmptyList<VirtualFileSystemPath>.InstanceList;
var paths = new List<VirtualFileSystemPath>(valueNames.Length);
foreach (string valueName in valueNames)
{
var value = key.GetValue(valueName) as string;
if (String.IsNullOrEmpty(value))
continue;
var path = VirtualFileSystemPath.TryParse(value, InteractionContext.SolutionContext);
if (!path.IsEmpty && path.IsAbsolute)
paths.Add(path);
}
return paths;
}
}