示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 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;
 }
示例#4
0
        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());
        }
示例#5
0
        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();
        }
示例#6
0
        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());
        }
示例#7
0
 public DependencyResolver(ResolveConfig resolveConfig, string[] excludeNodes = null, bool reverse = false)
 {
     this.resolveConfig = resolveConfig;
     this.excludeNodes = excludeNodes??new string[0];
     this.reverse = reverse;
 }
示例#8
0
 public DependencyResolver(ResolveConfig resolveConfig, string[] excludeNodes = null, bool reverse = false)
 {
     this.resolveConfig = resolveConfig;
     this.excludeNodes  = excludeNodes ?? new string[0];
     this.reverse       = reverse;
 }
示例#9
0
 public ProjectNode[] GetAllProjects()
 {
     return(ResolveConfig.GetProjects().Select(p => new ProjectBuilder(p, ProjectCache, runtimeProfile, ResolveConfig).BuildUp()).ToArray());
 }
示例#10
0
 public ResolveContext(ResolveConfig resolveConfig, IDictionary <string, ProjectNode> projectCache, string runtimeProfile)
 {
     ResolveConfig       = resolveConfig;
     ProjectCache        = projectCache;
     this.runtimeProfile = runtimeProfile;
 }
示例#11
0
 public MSBuildPatcher(ResolveConfig resolveConfig)
 {
     this.resolveConfig = resolveConfig;
 }
示例#12
0
 public CopyLocalDetector(string[] deployHints, ResolveConfig resolveConfig)
 {
     this.resolveConfig = resolveConfig;
     this.deployHints   = deployHints;
 }
示例#13
0
 public CopyLocalDetector(string[] deployHints, ResolveConfig resolveConfig)
 {
     this.resolveConfig = resolveConfig;
     this.deployHints = deployHints;
 }
示例#14
0
 public MSBuildPatcher(ResolveConfig resolveConfig)
 {
     this.resolveConfig = resolveConfig;
 }
示例#15
0
 public ResolveContext(ResolveConfig resolveConfig, IDictionary<string, ProjectNode> projectCache, string runtimeProfile)
 {
     ResolveConfig = resolveConfig;
     ProjectCache = projectCache;
     this.runtimeProfile = runtimeProfile;
 }