public virtual IPackageTree GetRootPackageTree(DirectoryInfo rootFolder) { IPackageTree root = new PackageTree(rootFolder, null); metaDataSynchroniser.SynchronisePackageTree(root); return(new PackageTree(rootFolder, null)); }
protected override void Before_each_spec() { dependencyResolver = CreateStub<IDependencyResolver>(); dependencyResolver.Stub(x => x.Resolve<SVNSourceControl>()) .Return(new SourceControlDouble(string.Empty)); IoC.InitializeWith(dependencyResolver); GetTestBuildConfigsFolder(); rootDirectory = GetTestBuildConfigsFolder(); packageTree = new PackageTree(rootDirectory, null); }
public virtual void BuildTree(IPackageTree parent, DirectoryInfo directory) { Parent = parent; children = new List <IPackageTree>(); Name = directory.Name; CurrentDirectory = directory; foreach (var child in directory.GetDirectories()) { if (IsReservedDirectory(child)) { continue; } var newNode = new PackageTree(child, this); children.Add(newNode); } if (DirectoryIsBuildNode(CurrentDirectory)) { CreateRequiredDirectories(); OnBuildNodeCreated(this); } if (parent == null) { Result.Delete(true); } OnCategoryCreated(this); }
protected virtual void BuildPackage(Package package, DirectoryInfo newDirectory) { var version = (package.IsTrunk) ? null : package.Version; if (!IoC.HasComponent <ICommandArgs>()) { var commandArgs = new CommandArgs(package.Name, false, version, false, null); IoC.AddComponentInstance(CommandArgs.IoCKey, typeof(ICommandArgs), commandArgs); } else { ((CommandArgs) IoC.Resolve<ICommandArgs>()).SetArguments(package.Name, false, version, false, null); } var packageBuilder = IoC.Resolve<IPackageCommand>("install"); //we are rebuilding the package tree each time to reset all the version numbers. var cleanPackageTree = new PackageTree(rootDirectory, null); packageBuilder.Execute(cleanPackageTree); }
protected override void Because() { directoryWithNoBooFile = Path.Combine(DirectoryHelper.GetBaseDirectory(), "nonexistent"); if (!Directory.Exists(directoryWithNoBooFile)) Directory.CreateDirectory(directoryWithNoBooFile); rootDirectory = new DirectoryInfo(directoryWithNoBooFile); packageTree = new PackageTree(rootDirectory, null); reader = new BooBuildConfigReader(); }
public virtual IPackageTree GetRootPackageTree(DirectoryInfo rootFolder) { IPackageTree root = new PackageTree(rootFolder, null); metaDataSynchroniser.SynchronisePackageTree(root); return new PackageTree(rootFolder, null); }
public virtual void BuildTree(IPackageTree parent, DirectoryInfo directory) { if (directory == null) { throw new ArgumentNullException("directory"); } Parent = parent; children = new List<IPackageTree>(); Name = directory.Name; CurrentDirectory = directory; foreach (var child in directory.GetDirectories()) { if (IsReservedDirectory(child)) continue; var newNode = new PackageTree(child, this); children.Add(newNode); } if (DirectoryIsBuildNode(CurrentDirectory)) { CreateRequiredDirectories(); OnBuildNodeCreated(this); } if (parent == null) { Result.Delete(true); } OnCategoryCreated(this); }