in vsintegration/src/FSharp.ProjectSystem.Base/RegistrationAttributes/WAProvideProjectFactoryAttribute.cs [183:235]
public override void Register(RegistrationContext context)
{
//context.Log.WriteLine(SR.GetString(SR.Reg_NotifyProjectFactory, FactoryType.Name));
using (Key projectKey = context.CreateKey(ProjectRegKey))
{
projectKey.SetValue(string.Empty, Name);
if (_displayName != null)
projectKey.SetValue("DisplayName", _displayName);
if (_displayProjectFileExtensions != null)
projectKey.SetValue("DisplayProjectFileExtensions", _displayProjectFileExtensions);
projectKey.SetValue("Package", context.ComponentType.GUID.ToString("B"));
if (_defaultProjectExtension != null)
projectKey.SetValue("DefaultProjectExtension", _defaultProjectExtension);
if (_possibleProjectExtensions != null)
projectKey.SetValue("PossibleProjectExtensions", _possibleProjectExtensions);
if (_projectTemplatesDirectory != null)
{
if (!System.IO.Path.IsPathRooted(_projectTemplatesDirectory))
{
// If path is not rooted, make it relative to package path
_projectTemplatesDirectory = System.IO.Path.Combine(context.ComponentPath, _projectTemplatesDirectory);
}
projectKey.SetValue("ProjectTemplatesDir", context.EscapePath(_projectTemplatesDirectory));
}
// VsTemplate Specific Keys
//
if (_languageVsTemplate != null)
projectKey.SetValue("Language(VsTemplate)", _languageVsTemplate);
if (_showOnlySpecifiedTemplatesVsTemplate || _templateGroupIDsVsTemplate != null || _templateIDsVsTemplate != null)
{
int showOnlySpecifiedTemplatesVsTemplate = _showOnlySpecifiedTemplatesVsTemplate ? 1 : 0;
projectKey.SetValue("ShowOnlySpecifiedTemplates(VsTemplate)", showOnlySpecifiedTemplatesVsTemplate);
}
if (_templateGroupIDsVsTemplate != null)
projectKey.SetValue("TemplateGroupIDs(VsTemplate)", _templateGroupIDsVsTemplate);
if (_templateIDsVsTemplate != null)
projectKey.SetValue("TemplateIDs(VsTemplate)", _templateIDsVsTemplate);
if (_displayProjectTypeVsTemplate != null)
projectKey.SetValue("DisplayProjectType(VsTemplate)", _displayProjectTypeVsTemplate);
if (_projectSubTypeVsTemplate != null)
projectKey.SetValue("ProjectSubType(VsTemplate)", _projectSubTypeVsTemplate);
if (_newProjectRequireNewFolderVsTemplate)
projectKey.SetValue("NewProjectRequireNewFolder(VsTemplate)", (int)1);
}
}