private static void ProcessConfiguration(DirectoryInfo solutionFolderInfo, XmlDocument templateXml) { var projectParentFolderLocation = solutionFolderInfo.Parent.Parent.FullName; templateConfig = new TemplateConfiguration { SolutionFolderInfo = solutionFolderInfo, ExtRootFolderName = templateXml.DocumentElement.SelectSingleNode("//AppSettings//ExtRootFolder").Attributes["Name"].Value, ExtRootNamespace = templateXml.DocumentElement.SelectSingleNode("//AppSettings//ExtRootNamespace").Attributes["Name"].Value, CopyrightInfo = GetCopyrightInfo(templateXml.DocumentElement.SelectSingleNode("//AppSettings//CopyrightInfoPath").Attributes["Location"].Value), ModelProviders = new List<ModelProvider>() }; foreach (XmlNode modelProvider in templateXml.DocumentElement.SelectNodes("ModelProviders/ModelProvider")) { var isAbsolutePath = modelProvider.Attributes["Absolute"]; if (isAbsolutePath != null && isAbsolutePath.Value == "true") { projectParentFolderLocation = string.Empty; } templateConfig.ModelProviders.Add(new ModelProvider { ProviderAssemblyLocation = projectParentFolderLocation + modelProvider.Attributes["AssemblyLocation"].Value }); } }
public static string GetCopyrightInfo(string fileName) { var CopyrightInfo = TemplateConfiguration.GetConfiguration().CopyrightInfo; return(String.Format(CopyrightInfo, fileName + ".js")); }