本文整理汇总了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();
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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));
}
示例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";
}
示例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);
}
示例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>();
}
示例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;
}
示例13: Update
public override string Update(IPackageTree packageTree, FileSystemInfo destination)
{
try
{
RunHGCommand("pull", destination.FullName);
}
catch (Exception ex)
{
HandleExceptions(ex);
}
return CurrentRevisionNumber(destination.FullName);
}
示例14: SetDslFactory
public virtual IBuildConfigReader SetDslFactory(IPackageTree packageTree)
{
PackageTree = packageTree;
factory = new DslFactory
{
BaseDirectory = packageTree.CurrentDirectory.FullName
};
factory.Register<BooConfigReader>(new ConfigReaderEngine());
return this;
}
示例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);
}
}