当前位置: 首页>>代码示例>>C#>>正文


C# IPackageTree类代码示例

本文整理汇总了C#中IPackageTree的典型用法代码示例。如果您正苦于以下问题:C# IPackageTree类的具体用法?C# IPackageTree怎么用?C# IPackageTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPackageTree类属于命名空间,在下文中一共展示了IPackageTree类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckOut

        public override string CheckOut(IPackageTree packageTree, FileSystemInfo destination)
        {
            SvnUpdateResult result = null;

            using (var client = new SvnClient())
            {
                try
                {
                    var svnOptions = new SvnCheckOutArgs();
                    if (UseRevision.HasValue)
                        svnOptions.Revision = new SvnRevision(UseRevision.Value);
                    client.CheckOut(new SvnUriTarget(new Uri(Url)), destination.FullName, svnOptions, out result);
                }
                catch (SvnRepositoryIOException sre)
                {
                    HandleExceptions(sre);
                }
                catch (SvnObstructedUpdateException sue)
                {
                    HandleExceptions(sue);
                }
            }

            return result.Revision.ToString();
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:25,代码来源:SvnSourceControl.cs

示例2: GetBuildMetaData

        public IBuildMetaData GetBuildMetaData(IPackageTree packageTree, string buildFile)
        {
            if (factory == null)
                throw new ArgumentNullException("You have not called SetDslFactory on class BooBuildConfigReader");

            return CreateBuildMetaData(packageTree.CurrentDirectory, packageTree.FullName);
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:7,代码来源:BooBuildConfigReader.cs

示例3: CalculateDependencies

        private BuildTree CalculateDependencies(IPackageTree packageTree, BuildTree currentTree)
        {
            if (currentTree == null)
            {
                currentTree = new BuildTree(packageTree);
            }
            else
            {
                if (HasACircularDependency(currentTree, packageTree))
                {
                    throw new CircularDependencyException(packageTree.Name);
                }

                InsertDependenciesBeforeParent(currentTree, packageTree);
            }

            var buildMetaData = packageTree.GetBuildMetaData(packageTree.Name);

            var buildEngine = buildMetaData.BuildEngine;

            var dependencies = buildEngine.Dependencies;

            foreach (var dependency in dependencies)
            {
                var package = packageTree.RetrievePackage(dependency);

                if (package is NullPackageTree)
                    throw new UnknownInstallPackageException(string.Format("No package definition exists for dependent package {0}, which is required by {1}.", dependency.PackageName, packageTree.FullName));

                CalculateDependencies(package, currentTree);
            }

            return currentTree;
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:34,代码来源:DependencyTree.cs

示例4: Update

        public override string Update(IPackageTree packageTree, FileSystemInfo destination)
        {
            Console.WriteLine(string.Format("pulling {0} to {1}", packageTree.Name, destination.FullName));

            revision = Guid.NewGuid().ToString();

            return revision;
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:8,代码来源:GitSourceControlDouble.cs

示例5: PathToBuildTool

        public string PathToBuildTool(IPackageTree packageTree, FrameworkVersion version)
        {
            var path = Path.Combine(packageTree.Root.CurrentDirectory.FullName, "buildengines");
            path = Path.Combine(path, "Phantom");
            path = Path.Combine(path, "Phantom.exe");

            return new FileInfo(path).FullName;
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:8,代码来源:PhantomBuildTool.cs

示例6: CommandLineArguments

        public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
        {
            Console.WriteLine(pathToBuildFile);
            Console.WriteLine(buildEngine);
            Console.WriteLine(packageTree);
            Console.WriteLine(version);

            return string.Empty;
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:9,代码来源:BuildToolStub.cs

示例7: Because

        protected override void Because()
        {
            buildEngine = new BuildEngine(null, "", FrameworkVersion.FrameworkVersion35,
                CreateStub<IDependencyDispatcher>());
            buildEngine.BuildRootDirectory = "output";
            packageTree = MockRepository.GenerateStub<IPackageTree>();
            packageTree.Expect(pt => pt.WorkingDirectory).Return(new DirectoryInfo("C:\\temp"));

            runner = new MSBuildBuildTool();
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:10,代码来源:MSBuildBuildToolSpecification.cs

示例8: Execute

        public void Execute(IPackageTree packageTree, IEnumerable<string> dependencyPaths, Dependency dependency)
        {
            if (!HasADependencyToUpdate(dependencyPaths))
                return;

            InfoFormat("Dependency: Executing Dependency Updaters for {0}", packageTree.Name);

            var dependentUpdaterContext = new DependentUpdaterContext(packageTree, dependencyPaths, dependency);
            updaters.ForEach(updater => updater.Update(dependentUpdaterContext));
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:10,代码来源:DependentUpdaterExecutor.cs

示例9: RevisionData

        public RevisionData(IPackageTree packageTree)
        {
            log.InfoFormat("Reading the current revision for {0}", packageTree.Name);

            revisionFileInfo = GetRevisionFile(packageTree);

            if (revisionFileInfo.Exists)
                return;

            revision = "0";
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:11,代码来源:RevisionData.cs

示例10: Because

        protected override void Because()
        {
            packageTree = CreateStub<IPackageTree>();

            packageTree.Stub(x => x.WorkingDirectory).Return(new DirectoryInfo(@"C:\"));

            buildToolStub = CreateStub<IBuildTool>();

            buildEngine = new BuildEngine(buildToolStub, "deeper/than/this/somebuild.file", FrameworkVersion.FrameworkVersion35, CreateStub<IDependencyDispatcher>());

            buildEngine.Build(new StubProcessFactory(), packageTree);
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:12,代码来源:BuildEngineSpec.cs

示例11: Before_each_spec

        protected override void Before_each_spec()
        {
            dependencyResolver = CreateStub<IDependencyResolver>();
            dependencyResolver.Stub(x => x.Resolve<SVNSourceControl>()).Return(new SVNSourceControl(string.Empty));

            IoC.InitializeWith(dependencyResolver);

            factory = new DslFactory { BaseDirectory = DirectoryHelper.GetBaseDirectory() };
            factory.Register<BooConfigReader>(new ConfigReaderEngine());

            packageTree = MockRepository.GenerateStub<IPackageTree>();
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:12,代码来源:BuildWithBatchSpecificationBase.cs

示例12: PrepareRepository

        public virtual IRepositoryElement PrepareRepository(IPackageTree packageToExportTo, IGet get)
        {
            packageTreeToExportTo = packageToExportTo;

            var root = packageToExportTo.Root;
            var buildMetaData = root.GetBuildMetaData(RepositoryName);

            repositoryTree = root.RetrievePackage(RepositoryName);

            get.From(buildMetaData.SourceControl).ExportTo(repositoryTree);

            return this;
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:13,代码来源:RepositoryElement.cs

示例13: Update

        public override string Update(IPackageTree packageTree, FileSystemInfo destination)
        {
            try
            {
                RunHGCommand("pull", destination.FullName);
            }
            catch (Exception ex)
            {
                HandleExceptions(ex);
            }

            return CurrentRevisionNumber(destination.FullName);
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:13,代码来源:MercurialSourceControl.cs

示例14: SetDslFactory

        public virtual IBuildConfigReader SetDslFactory(IPackageTree packageTree)
        {
            PackageTree = packageTree;

            factory = new DslFactory
                            {
                                BaseDirectory = packageTree.CurrentDirectory.FullName
                            };

            factory.Register<BooConfigReader>(new ConfigReaderEngine());

            return this;
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:13,代码来源:BooBuildConfigReader.cs

示例15: BuildDependencyTree

        protected virtual void BuildDependencyTree(IPackageTree packageTree, IDependencyTree dependencyTree)
        {
            foreach (var nextTree in dependencyTree)
            {
                IBuildMetaData nextMetaData = GetBuildMetaData(nextTree);

                if (!commandArgs.RebuildOnly)
                    RetrieveSourceCode(nextMetaData, nextTree);

                ExecutePrebuildCommands(nextMetaData, nextTree);

                BuildSource(nextTree, nextMetaData);
            }
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:14,代码来源:PackageBuilder.cs


注:本文中的IPackageTree类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。