JD2022-TU1/main/tools/apps/Packager/AssetCooker/Model.cs

30 lines
711 B
C#

using System.Collections.Generic;
using System.Linq;
namespace Packager.AssetCooker
{
/// <summary>
/// List of tasks to be executed to complete the cooking
/// </summary>
public class Model
{
public List<Task> Tasks { get; private set; }
public TaskQueue Queue { get; private set; }
public Model(string[] cookList)
{
Tasks = new List<Task>();
CreateTasks(cookList);
Queue = new TaskQueue(Tasks);
}
private void CreateTasks(string[] cookList)
{
foreach (var t in cookList.Select(file => new Task(file)))
{
Tasks.Add(t);
}
}
}
}