void Install(bool existingSolution) { foreach (var project in DteExtensions.DTE.Solution.Projects()) { var platform = project.GetPlatform(); var platformModules = _allModules.Where(module => module.Platform == platform).ToArray(); if (platformModules.Any()) { if (!project.IsApplicationProject()) { RegisterModules(platformModules, project, platform); } else { if (_allModules.Any(module => module.IsWorldCreator)) { AddWorldCreatorConnectionString(project); } } var assembliesPath = Path.GetDirectoryName(platformModules.First().AssemblyPath) + ""; var references = ((VSProject)project.Object).References; references.Add(Path.Combine(assembliesPath, "Xpand.Persistent.Base.dll")); references.Add(Path.Combine(assembliesPath, "Xpand.Persistent.BaseImpl.dll")); } } if (_allModules.Any(module => module.IsSecurity)) { SecurityInstaller.Install(_allModules, existingSolution); } }
public static void Install(XpandModule[] allModules, bool existingSolution) { var securityInstaller = new SecurityInstaller(allModules); if (!existingSolution) { securityInstaller.ReplaceUpdater(); securityInstaller.ModifyApplicationProjects(allModules); } }