Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/BuildGraph/BgTask.cs
Ben Marsh ff46dfcfce BuildGraph: Various refactorings prior to adding bytecode executor.
* Moved XML script parsing into UAT. We don't need to evaluate this in Horde.
* Added custom node types for script and expression nodes, rather than wrapping native nodes with a custom script task.
#preflight 62b31b76650c9d58579b2ea6

[CL 20773724 by Ben Marsh in ue5-main branch]
2022-06-22 09:56:45 -04:00

52 lines
1.1 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System.Collections.Generic;
using System.Xml;
namespace AutomationTool
{
/// <summary>
/// A task invocation
/// </summary>
public class BgTask
{
/// <summary>
/// Line number in a source file that this task was declared. Optional; used for log messages.
/// </summary>
public BgScriptLocation Location { get; }
/// <summary>
/// Name of the task
/// </summary>
public string Name { get; set; }
/// <summary>
/// Arguments for the task
/// </summary>
public Dictionary<string, string> Arguments { get; } = new Dictionary<string, string>();
/// <summary>
/// Constructor
/// </summary>
public BgTask(BgScriptLocation location, string name)
{
Location = location;
Name = name;
}
/// <summary>
/// Write to an xml file
/// </summary>
/// <param name="writer"></param>
public void Write(XmlWriter writer)
{
writer.WriteStartElement(Name);
foreach (KeyValuePair<string, string> argument in Arguments)
{
writer.WriteAttributeString(argument.Key, argument.Value);
}
writer.WriteEndElement();
}
}
}