public TaskContext( IExecutionStrategy executionStrategy, ILogRenderer logRenderer, IDirectory workDirectory, IEnvironment environment, ITaskInterceptor interceptor) : this(ResultsStorage.Empty, executionStrategy, null, logRenderer, workDirectory, environment, interceptor, Identities.Empty) { }
private static IFile GetInputFile(RosaliaOptions options, IDirectory workDirectory) { var inputFile = options.InputFile; if (string.IsNullOrEmpty(inputFile)) { return null; } IFile result = Path.IsPathRooted(inputFile) ? new DefaultFile(inputFile) : workDirectory[options.InputFile].AsFile(); return result; }
public string GetRelativePath(IDirectory directory) { var basePath = directory.AbsolutePath; if (!basePath.EndsWith("\\")) { basePath += "\\"; } var thisItem = new Uri(AbsolutePath); var baseItem = new Uri(basePath); return Uri.UnescapeDataString( baseItem.MakeRelativeUri(thisItem) .ToString() .Replace('/', Path.DirectorySeparatorChar)); }
public static GenerateNuGetSpecTask FillCommonProperties( this GenerateNuGetSpecTask input, IDirectory dependenciesProject, string version, params IFile[] libBinaries) { return libBinaries.Aggregate( input .Version(version) .Authors("Eugene Guryanov") .Owners("Eugene Guryanov") .LicenseUrl("http://dev.perl.org/licenses/") .ProjectUrl("https://github.com/guryanovev/CrystalQuartz") .Tags(".NET", "ASP.NET", "Quartz.NET", "Scheduler", "Job", "Trigger") .WithDependenciesFromPackagesConfig(dependenciesProject, ignoreFrameworkVersion: true), (x, file) => x.WithFile(file, "lib")); }
public static GenerateNuGetSpecTask FillCommonProperties( this GenerateNuGetSpecTask input, IDirectory webProjectBin, string version) { var webBinDirectory = webProjectBin; return input .Version(version) .Authors("Eugene Guryanov") .Owners("Eugene Guryanov") .LicenseUrl("http://dev.perl.org/licenses/") .ProjectUrl("https://github.com/guryanovev/CrystalQuartz") .Tags(".NET", "ASP.NET", "Quartz.NET", "Scheduler", "Job", "Trigger") .WithDependenciesFromPackagesConfig((webProjectBin.Parent.Parent/"src"/"CrystalQuartz.Web").AsDirectory()) .WithFile(webBinDirectory.GetFile("CrystalQuartz.Core.dll"), "lib") .WithFile(webBinDirectory.GetFile("CrystalQuartz.WebFramework.dll"), "lib") .WithFile(webBinDirectory.GetFile("CrystalQuartz.Web.dll"), "lib"); }
private static ITaskResult<Nothing> ExecuteWorkflow( IWorkflow workflow, Identities tasks, ILogRenderer logRenderer, IDirectory workDirectory) { var executer = new SubflowTask<Nothing>( workflow, tasks); var context = new TaskContext( new ParallelExecutionStrategy(), logRenderer, workDirectory, new DefaultEnvironment(), new CompositeInterceptor( new LoggingInterceptor())); return executer.Execute(context); }
private static InitializationResult InitializeWorkflow( RosaliaOptions options, IDirectory workDirectory, ILogRenderer logRenderer, IFile inputFile) { var runner = new Runner(); var runningOptions = new RunningOptions { InputFile = inputFile, WorkflowBuildOutputPath = options.WorkflowBuildOutputPath, WorkflowProjectBuildConfiguration = options.WorkflowProjectBuildConfiguration, LogRenderer = logRenderer, WorkDirectory = workDirectory, Properties = options.Properties }; return runner.Init(runningOptions); }
private TaskContext( IResultsStorage results, IExecutionStrategy executionStrategy, Identity identity, ILogRenderer logRenderer, IDirectory workDirectory, IEnvironment environment, ITaskInterceptor interceptor, Identities identitiesTail) { _identity = identity; _results = results; _executionStrategy = executionStrategy; _logRenderer = logRenderer; _workDirectory = workDirectory; _environment = environment; _interceptor = interceptor; _identitiesTail = identitiesTail; _log = new LogHelper(message => logRenderer.Render(message, GetFullIdentitiesPath())); }
private IEnumerable<IFile> GetFilesRecursivelySource(IDirectory directory) { if (directory.Files != null) { foreach (var file in directory.Files) { yield return file; } } if (directory.Directories != null) { foreach (var childDirectory in directory.Directories) { foreach (var childFile in GetFilesRecursivelySource(childDirectory)) { yield return childFile; } } } }
public abstract void CopyTo(IDirectory directory);
/// <summary> /// Retrieves all directory files recursively. /// </summary> /// <param name="directory">target directory</param> /// <returns>a list of files</returns> public FileList SearchFilesIn(IDirectory directory) { return new FileList(GetFilesRecursivelySource(directory), directory); }
public SolutionStructure(IDirectory root) { _root = root; }
/// <summary> /// Reads dependencies from packages.config file. /// </summary> public GenerateNuGetSpecTask WithDependenciesFromPackagesConfig(IDirectory projectDirectory, bool ignoreFrameworkVersion = false) { var packagesConfigFile = projectDirectory.GetFile("packages.config"); if (packagesConfigFile.Exists) { WithDependenciesFromPackagesConfig(packagesConfigFile, ignoreFrameworkVersion); } return this; }
public override void CopyTo(IDirectory directory) { // todo }
public override void CopyTo(IDirectory directory) { CopyTo(directory.GetFile(Name)); }