public BuildService(IILView view, IBuildLog buildLog) { _view = view; _buildLog = buildLog; _log = new Log(buildLog.Writer); _log.Level++; Listen(); }
/// <inheritdoc /> /// <exception cref="ArgumentNullException">The <paramref name="configuration" /> parameter is null.</exception> /// <exception cref="ArgumentNullException">The <paramref name="buildLog" /> parameter is null.</exception> public void Initialize(IBuildConfiguration configuration, IBuildLog buildLog) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (buildLog == null) { throw new ArgumentNullException(nameof(buildLog)); } Configuration = configuration; Log = buildLog; }
public BuildNode(ProjectDependencyGraph graph, TaskEngine.TaskEngine taskEngine, IBuildLog buildLog, string name, string target) { if (graph == null) { throw new ArgumentNullException("graph"); } if (taskEngine == null) { throw new ArgumentNullException("taskEngine"); } if (buildLog == null) { throw new ArgumentNullException("buildLog"); } if (target == null) { throw new ArgumentNullException("target"); } if (name == null) { throw new ArgumentNullException("name"); } if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentException("A non-empty/whitespace name must be given", "name"); } if (target == null) { throw new ArgumentNullException("target"); } _graph = graph; _taskEngine = taskEngine; _buildLog = buildLog; _name = name; _target = target; _thread = new Thread(Run) { IsBackground = true, Name = name }; _thread.Start(); }
private static object?Build(ICreationRule?rule, Type typeToBuild, string?referenceName, IBuildChain buildChain, Func <object?> createAction, IBuildLog buildLog) { if (rule == null) { return(null); } var context = buildChain.Last; var ruleType = rule.GetType(); buildLog.CreatingValue(typeToBuild, ruleType, context); try { return(createAction()); } catch (BuildException) { throw; } catch (Exception ex) { buildLog.BuildFailure(ex); const string messageFormat = "Failed to create value for type {0} using creation rule {1}, {2}: {3}{4}{4}At the time of the failure, the build log was:{4}{4}{5}"; var output = buildLog.Output; var message = string.Format( CultureInfo.CurrentCulture, messageFormat, typeToBuild.FullName, ruleType.FullName, ex.GetType().Name, ex.Message, Environment.NewLine, output); throw new BuildException(message, typeToBuild, referenceName, context, output, ex); } }
public DefaultExecuteStrategyTests(ITestOutputHelper output) { _buildLog = new OutputBuildLog(output); }
public void Initialize(IBuildConfiguration configuration, IBuildLog buildLog) { }
public BuildLogBehaviour(IBuildLog log) { _log = log; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultExecuteStrategy" /> class. /// </summary> /// <param name="buildHistory">The build history tracker.</param> /// <param name="buildLog">The build log.</param> /// <param name="buildProcessor">The build processor.</param> public DefaultExecuteStrategy(IBuildHistory buildHistory, IBuildLog buildLog, IBuildProcessor buildProcessor) : base(buildHistory, buildLog, buildProcessor) { }
public Logger(IBuildLog buildLog, int id) { _buildLog = buildLog; _id = id; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultExecuteStrategy" /> class. /// </summary> /// <param name="buildHistory">The build history tracker.</param> /// <param name="buildLog">The build log.</param> /// <param name="buildProcessor">The build processor.</param> public DefaultExecuteStrategy(IBuildHistory buildHistory, IBuildLog buildLog, IBuildProcessor buildProcessor) { _buildHistory = buildHistory ?? throw new ArgumentNullException(nameof(buildHistory)); Log = buildLog ?? throw new ArgumentNullException(nameof(buildLog)); _buildProcessor = buildProcessor ?? throw new ArgumentNullException(nameof(buildProcessor)); }