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); }
protected override IEnumerable<Assembly> GetAssemblies(LookupOptions options) { var buildWorkflow = new BuildWorkflowProjectWorkflow(options.RunningOptions); var executerTask = new SubflowTask<Nothing>(buildWorkflow, Identities.Empty); var taskContext = new TaskContext( new SequenceExecutionStrategy(), options.RunningOptions.LogRenderer, options.RunningOptions.WorkDirectory, new DefaultEnvironment(), interceptor: null); ITaskResult<Nothing> buildResult = executerTask.Execute(taskContext); if (buildResult.IsSuccess) { var projectName = options.RunningOptions.InputFile.NameWithoutExtension; IFile assemblyFile = options.RunningOptions.InputFile.Directory["bin"]["Debug"][projectName + ".dll"]; yield return Assembly.LoadFile(assemblyFile.AbsolutePath); } }