/// <summary> /// Creates a script inside of its parent <see cref="DataObject"/>, starting at a specific <see cref="ICommand"/> and containing script information and documentation. /// </summary> /// <param name="parent">The owning object of the script. This <see cref="DataObject"/> provides the memory context for the <see cref="Script"/>'s <see cref="Thread"/>.</param> /// <param name="info">Contains information about the name and inputs of the script.</param> /// <param name="commands">A collection of <see cref="ICommand"/> objects that make up a <see cref="Script"/>. They are run in this order on the <see cref="Thread"/> when the <see cref="Script"/> is called.</param> /// <param name="addedCapabilities">A collection of any user-defined <see cref="Capability"/> values required to execute this <see cref="Script"/>.</param> public CommandScript(DataObject parent, ScriptInfo info, IEnumerable <ICommand> commands, CapabilitiesCollection addedCapabilities = null) : base(parent, info) { Commands = commands; AdditionalCapabilities = addedCapabilities; }
/// <summary> /// Creates a new <see cref="Script"/>. /// </summary> /// <param name="parent">The <see cref="DataObject"/> that this <see cref="Script"/>, functioning as the <see cref="Script"/>'s context.</param> /// <param name="info">Contains information and documentation about the script, including its name and inputs.</param> protected Script(DataObject parent, ScriptInfo info) { ParentObject = parent; ScriptInfo = info; }