public override bool Execute() { var config = new ResolveConfig(ConfigFile.ItemSpec, RootDir.ItemSpec); var copyLocalDetector = new CopyLocalDetector(DeployHints.Select(dh => dh.ItemSpec).ToArray(), config); ProjectCopyLocals = copyLocalDetector.Dectect().Select(CreateProjectCopyLocal).ToArray(); return true; }
public override bool Execute() { var resolveConfig = new ResolveConfig(ConfigFile.ItemSpec, RootDir.ItemSpec); var runtimeProfile = RuntimeProfile == null ? String.Empty : RuntimeProfile.ItemSpec; var msBuildPatch = new MSBuildPatcher(resolveConfig).Resolve(InputProjects.Select(t => t.GetMetadata("FullPath")).ToArray(), runtimeProfile); Copies = msBuildPatch.CopyItemSets.Select(CreateCopyTaskItem).ToArray(); OutProjects = msBuildPatch.CompileProjects.Select(CreateProjectItem).ToArray(); return true; }
public override bool Execute() { var excludes = (ExcludeNodes??new ITaskItem[0]).Select(t => t.GetMetadata("FullPath")).ToArray(); var resolveConfig = new ResolveConfig(ConfigFile.ItemSpec, RootDir.ItemSpec); var inputNodePaths = InputProjects.Select(t => t.GetMetadata("FullPath")).ToArray(); var endNodePaths = (EndNodes??new ITaskItem[0]).Select(n => n.GetMetadata("FullPath")).ToArray(); var runtimeProfile = RuntimeProfile == null ? string.Empty : RuntimeProfile.ItemSpec; var result = new DependencyResolver(resolveConfig, excludes, Reverse).Resolve(inputNodePaths, endNodePaths, runtimeProfile); Dependences = result.Select(CreateTaskItem).ToArray(); return true; }
public IDependencyNode LoadAssembly(AssemblyReference assemblyReference) { if (assemblyReference.AssemblyReferneceType == AssemblyReferneceType.Lib) { return(new AssemblyNode { FullPath = assemblyReference.FullPath }); } var path = ResolveConfig.GetProjectPathByAssemblyName(assemblyReference.SimpleName); return(new ProjectBuilder(path, ProjectCache, runtimeProfile, ResolveConfig).BuildUp()); }
private static string[] GetCopyLocals(ResolveConfig config, string project) { var extractor = new ProjectExtractor(project, config); var projectReferenceNodes = extractor.GetProjectReferenceNodes().ToArray(); Array.ForEach(projectReferenceNodes, n => n.Include = config.GetAssemblyNameByProjectPath(ToFullPath(n.Include, project))); var nodes = extractor.GetAssemblyReferenceNodes() .Concat(projectReferenceNodes.Where(n => !string.IsNullOrEmpty(n.Include))) .Where(n => n.IsPrivate && config.IsManaged(n.Include, n.HintPath, project)); return nodes.Select(n => n.Include).ToArray(); }
private static string[] GetCopyLocals(ResolveConfig config, string project) { var extractor = new ProjectExtractor(project, config); var projectReferenceNodes = extractor.GetProjectReferenceNodes().ToArray(); Array.ForEach(projectReferenceNodes, n => n.Include = config.GetAssemblyNameByProjectPath(ToFullPath(n.Include, project))); var nodes = extractor.GetAssemblyReferenceNodes() .Concat(projectReferenceNodes.Where(n => !string.IsNullOrEmpty(n.Include))) .Where(n => n.IsPrivate && config.IsManaged(n.Include, n.HintPath, project)); return(nodes.Select(n => n.Include).ToArray()); }
public DependencyResolver(ResolveConfig resolveConfig, string[] excludeNodes = null, bool reverse = false) { this.resolveConfig = resolveConfig; this.excludeNodes = excludeNodes??new string[0]; this.reverse = reverse; }
public DependencyResolver(ResolveConfig resolveConfig, string[] excludeNodes = null, bool reverse = false) { this.resolveConfig = resolveConfig; this.excludeNodes = excludeNodes ?? new string[0]; this.reverse = reverse; }
public ProjectNode[] GetAllProjects() { return(ResolveConfig.GetProjects().Select(p => new ProjectBuilder(p, ProjectCache, runtimeProfile, ResolveConfig).BuildUp()).ToArray()); }
public ResolveContext(ResolveConfig resolveConfig, IDictionary <string, ProjectNode> projectCache, string runtimeProfile) { ResolveConfig = resolveConfig; ProjectCache = projectCache; this.runtimeProfile = runtimeProfile; }
public MSBuildPatcher(ResolveConfig resolveConfig) { this.resolveConfig = resolveConfig; }
public CopyLocalDetector(string[] deployHints, ResolveConfig resolveConfig) { this.resolveConfig = resolveConfig; this.deployHints = deployHints; }
public ResolveContext(ResolveConfig resolveConfig, IDictionary<string, ProjectNode> projectCache, string runtimeProfile) { ResolveConfig = resolveConfig; ProjectCache = projectCache; this.runtimeProfile = runtimeProfile; }