private AssemblyReference[] GetAssemblyReferences(ProjectExtractor extractor) { var references = extractor.GetAssemblyReferenceNodes(); return(references.Select(r => CreateAssemblyReference(r, () => r.IsPrivate)) .Where(ar => ar.AssemblyReferneceType != AssemblyReferneceType.None).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(); }
private AssemblyReference[] GetRuntimeReferences(ProjectExtractor extractor) { var references = extractor.GetCommonRuntimeReferenceNodes(); if (!string.IsNullOrEmpty(runtimeProfile)) { var profileReferences = extractor.GetRuntimeReferenceNodes(runtimeProfile); references = references.Concat(profileReferences); } else { var defaultReferences = extractor.GetDefaultRuntimeReferenceNodes(); references = references.Concat(defaultReferences); } return(references.Select(r => CreateAssemblyReference(r, () => true)) .Where(ar => ar.AssemblyReferneceType != AssemblyReferneceType.None).ToArray()); }
public ProjectNode BuildUp() { if (!cache.ContainsKey(projectFullPath)) { var extractor = new ProjectExtractor(projectFullPath, resolveConfig); var project = new ProjectNode { Id = extractor.GetId(), AssemblyReferences = GetAssemblyReferences(extractor), ProjectReferences = GetProjectReferences(extractor), RuntimeReferences = GetRuntimeReferences(extractor), FullPath = projectFullPath, Output = resolveConfig.GetAssemblyNameByProjectPath(projectFullPath) }; cache[projectFullPath] = project; } return(cache[projectFullPath]); }
public ProjectNode BuildUp() { if (!cache.ContainsKey(projectFullPath)) { var extractor = new ProjectExtractor(projectFullPath, resolveConfig); var project = new ProjectNode { Id = extractor.GetId(), AssemblyReferences = GetAssemblyReferences(extractor), ProjectReferences = GetProjectReferences(extractor), RuntimeReferences = GetRuntimeReferences(extractor), FullPath = projectFullPath, Output = resolveConfig.GetAssemblyNameByProjectPath(projectFullPath) }; cache[projectFullPath] = project; } return cache[projectFullPath]; }
private ProjectReference[] GetProjectReferences(ProjectExtractor extractor) { var nodesByXPath = extractor.GetProjectReferenceNodes(); return(nodesByXPath.Select(CreateProjectReference).ToArray()); }
private AssemblyReference[] GetAssemblyReferences(ProjectExtractor extractor) { var references = extractor.GetAssemblyReferenceNodes(); return references.Select(r => CreateAssemblyReference(r, () => r.IsPrivate)) .Where(ar => ar.AssemblyReferneceType != AssemblyReferneceType.None).ToArray(); }
private AssemblyReference[] GetRuntimeReferences(ProjectExtractor extractor) { var references = extractor.GetCommonRuntimeReferenceNodes(); if (!string.IsNullOrEmpty(runtimeProfile)) { var profileReferences = extractor.GetRuntimeReferenceNodes(runtimeProfile); references = references.Concat(profileReferences); } else { var defaultReferences = extractor.GetDefaultRuntimeReferenceNodes(); references = references.Concat(defaultReferences); } return references.Select(r => CreateAssemblyReference(r, ()=> true)) .Where(ar => ar.AssemblyReferneceType != AssemblyReferneceType.None).ToArray(); }
private ProjectReference[] GetProjectReferences(ProjectExtractor extractor) { var nodesByXPath = extractor.GetProjectReferenceNodes(); return nodesByXPath.Select(CreateProjectReference).ToArray(); }