/// <summary> /// Factory method for deserialization /// </summary> internal static NodeShutdown FactoryForDeserialization(ITranslator translator) { NodeShutdown shutdown = new NodeShutdown(); shutdown.Translate(translator); return(shutdown); }
/// <summary> /// The task host node failed for some reason /// </summary> private void HandleNodeShutdown(NodeShutdown nodeShutdown) { // if the task was canceled, it may send the shutdown packet before the task itself has exited -- // in this case, the shutdown is expected, so don't log errors. Also don't update taskExecutionSucceeded, // as it has already been set properly (likely also to false) when we dealt with the TaskComplete // packet that was sent immediately prior to this. if (!_taskCancelled) { // nothing much else to say. _taskExecutionSucceeded = false; _taskLoggingContext.LogError(new BuildEventFileInfo(_taskLocation), "TaskHostExitedPrematurely", (nodeShutdown.Exception == null) ? String.Empty : nodeShutdown.Exception.ToString()); } }