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