Пример #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;
 }